cdef extern from "bigint.h": cdef cppclass bigint: bigint() #bigint(unsigned int) #bigint(signed int) #bigint(unsigned long) #bigint(signed long) bigint(double) bigint(bigint&) #operators bigint operator++() bigint operator++(int) bigint operator--() bigint operator--(int) #comparison int operator==(bigint&, bigint&) int operator!=(bigint&, bigint&) int operator<(bigint&, bigint&) int operator>(bigint&, bigint&) int operator<=(bigint&, bigint&) int operator>=(bigint&, bigint&) #int operator &&(bigint&, bigint&) #int operator ||(bigint&, bigint&) #int operator!(bigint&) #bit bigint operator &(bigint&, bigint&) bigint operator |(bigint&, bigint&) bigint operator ^(bigint&, bigint&) #arithmetic and assignment #bigint& operator+=(bigint&) #bigint& operator-=(bigint&) #bigint& operator*=(bigint&) #bigint& operator/=(bigint&) #bigint& operator<<=(unsigned long) #bigint& operator>>=(unsigned long) #bigint& operator&=(bigint&) #bigint& operator|=(bigint&) #bigint& operator^=(bigint&) #stream #ostream& operator<<(ostream&, bigint&) #istream& operator>>(istream&, bigint&) unsigned long len() int fits_long() int fits_unsigned_long() long as_long() unsigned long as_unsigned_long() cdef bigint operator+(bigint&, bigint&) cdef bigint operator-(bigint&, bigint&) cdef bigint operator-(bigint&) cdef bigint operator*(bigint&, bigint&) cdef bigint operator/(bigint&, bigint&) cdef bigint operator<<(bigint&, unsigned long) cdef bigint operator>>(bigint&, unsigned long) cdef int sgn(bigint&) cdef int bit(unsigned long) cdef bigint abs(bigint&) cdef bigint sqrt(bigint&) cdef bigint root(bigint&) cdef double frexp(bigint&, long*) #algebra cdef bigint gcd(bigint&, bigint&) cdef bigint lcm(bigint&, bigint&) cdef class Py_bigint: cdef bigint *thisptr def __cinit__(self): self.thisptr = new bigint() def len(self): return self.thisptr.len() def fits_long(self): return self.thisptr.fits_long() def fits_unsigned_long(self): return self.thisptr.fits_unsigned_long() def as_long(self): return self.thisptr.as_long() def as_unsigned_long(self): return self.thisptr.as_unsigned_long() cdef extern from "bigint_vector.h": cdef cppclass bigint_vector: bigint_vector() cdef class Py_bigint_vector: cdef bigint_vector *thisptr def __cinit__(self): self.thisptr = new bigint_vector() cdef extern from "bigint_matrix.h": cdef cppclass bigint_matrix: bigint_matrix() cdef class Py_bigint_matrix: cdef bigint_matrix *thisptr def __cinit__(self): self.thisptr = new bigint_matrix() cdef extern from "kintpoly.h": cdef cppclass K_INTPOLY: K_INTPOLY() cdef class Py_K_INTPOLY: cdef K_INTPOLY *thisptr def __cinit__(self): self.thisptr = new K_INTPOLY() cdef extern from "kfloatpoly.h": cdef cppclass K_FLOATPOLY: K_FLOATPOLY() cdef class Py_K_FLOATPOLY: cdef K_FLOATPOLY *thisptr def __cinit__(self): self.thisptr = new K_FLOATPOLY() cdef extern from "bigrational.h": cdef cppclass bigrational: bigrational() bigrational(unsigned int) bigrational(signed int) bigrational(unsigned long) bigrational(signed long) bigrational(double) bigrational(bigint&) bigrational(bigint&, bigint&) bigrational(bigrational&) unsigned long len() double as_double() int fits_bigint() bigint as_bigint() cdef class Py_bigrational: cdef bigrational *thisptr def __cinit__(self): self.thisptr = new bigrational() cdef extern from "bigrational_vector.h": cdef cppclass bigrational_vector: bigrational_vector() cdef bigrational_vector Solve_VDM_GE(bigrational_vector&, bigrational_vector&) cdef class Py_bigrational_vector: cdef bigrational_vector *thisptr def __cinit__(self): self.thisptr = new bigrational_vector() cdef extern from "bigrational_matrix.h": cdef cppclass bigrational_matrix: bigrational_matrix() cdef class Py_bigrational_matrix: cdef bigrational_matrix *thisptr def __cinit__(self): self.thisptr = new bigrational_matrix() cdef extern from "kboxco2.h": cdef cppclass K_BOXCO2: K_BOXCO2() cdef class Py_K_BOXCO2: cdef K_BOXCO2 *thisptr def __cinit__(self): self.thisptr = new K_BOXCO2() cdef extern from "kratpoly.h": cdef cppclass K_RATPOLY: K_RATPOLY() cdef class Py_K_RATPOLY: cdef K_RATPOLY *thisptr def __cinit__(self): self.thisptr = new K_RATPOLY() cdef extern from "root1.h": cdef cppclass ROOT1: ROOT1() ROOT1(K_RATPOLY&, bigrational&, bigrational&, long, long) ROOT1(K_RATPOLY&, bigrational&, bigrational&, double) ROOT1(ROOT1&) unsigned long isolate_roots(ROOT1*&, bigrational&) cdef class Py_ROOT1: cdef ROOT1 *thisptr def __cinit__(self): self.thisptr = new ROOT1() cdef extern from "kpoint1d.h": cdef cppclass K_POINT1D: K_POINT1D() cdef class Py_K_POINT1D: cdef K_POINT1D *thisptr def __cinit__(self): self.thisptr = new K_POINT1D() cdef extern from "kpoint2d.h": cdef cppclass K_POINT2D: K_POINT2D() cdef class Py_K_POINT2D: cdef K_POINT2D *thisptr def __cinit__(self): self.thisptr = new K_POINT2D() cdef extern from "kpoly.h": cdef cppclass K_POLY: K_POLY() cdef class Py_K_POLY: cdef K_POLY *thisptr def __cinit__(self): self.thisptr = new K_POLY() cdef extern from "kcurve.h": cdef cppclass K_CURVE: K_CURVE() cdef class Py_K_CURVE: cdef K_CURVE *thisptr def __cinit__(self): self.thisptr = new K_CURVE() cdef extern from "ksegment.h": cdef cppclass K_SEGMENT: pass #no public members? #cdef class Py_K_SEGMENT: # cdef K_SEGMENT *thisptr # def __cinit__(self): # self.thisptr = new K_SEGMENT() cdef extern from "kpartition.h": cdef cppclass K_PARTITION: K_PARTITION() cdef class Py_K_PARTITION: cdef K_PARTITION *thisptr def __cinit__(self): self.thisptr = new K_PARTITION() cdef extern from "kgraph.h": cdef cppclass K_GRAPH: K_GRAPH() cdef class Py_K_GRAPH: cdef K_GRAPH *thisptr def __cinit__(self): self.thisptr = new K_GRAPH() cdef extern from "kpatch.h": cdef cppclass K_PATCH: K_PATCH() cdef class Py_K_PATCH: cdef K_PATCH *thisptr def __cinit__(self): self.thisptr = new K_PATCH() cdef extern from "kbox3d.h": cdef cppclass K_BOX3D: K_BOX3D() cdef class Py_K_BOX3D: cdef K_BOX3D *thisptr def __cinit__(self): self.thisptr = new K_BOX3D() cdef extern from "ksurf.h": cdef cppclass K_SURF: K_SURF() cdef class Py_K_SURF: cdef K_SURF *thisptr def __cinit__(self): self.thisptr = new K_SURF() cdef extern from "ksolid.h": cdef cppclass K_SOLID: K_SOLID() K_SOLID(K_PATCH*, unsigned long) K_SOLID(K_SOLID&) unsigned long num_patches K_PATCH** patches void internal_gen_box(bigrational_vector*, long unsigned int) void initialize_from_patches(K_PATCH*, long unsigned int) void bryan_read_box_from_file(char *) K_SOLID transform(bigrational_matrix&) #void internal_read_box(std::istream&, bigrational&) #int Bezier_output(ostream&) int classify_pt(bigrational&, bigrational&, bigrational&) int classify_pt(bigrational_vector&) K_SOLID boolean(K_SOLID&, char) K_SOLID merge(K_SOLID&) cdef K_SOLID read_CSG(char*, char*, bigrational&) #K_SOLID read_solid(istream&, bigrational&) #bigrational_matrix read_BRLCAD_matrix(istream&) cdef class Py_K_SOLID: cdef K_SOLID *thisptr def __cinit__(self): self.thisptr = new K_SOLID() property num_patches: def __get__(self): return self.thisptr.num_patches def __set__(self, value): self.thisptr.num_patches = value