|
| | InternalPoly () |
| |
| | InternalPoly (const Variable &v, const int e, const CanonicalForm &c) |
| |
| | InternalPoly (const InternalPoly &) |
| |
| | ~InternalPoly () |
| |
| InternalCF * | deepCopyObject () const |
| |
| const char * | classname () const |
| |
| int | level () const |
| |
| Variable | variable () const |
| |
| int | degree () |
| | int InternalPoly::degree () More...
|
| |
| CanonicalForm | lc () |
| |
| CanonicalForm | Lc () |
| |
| CanonicalForm | LC () |
| |
| int | taildegree () |
| |
| CanonicalForm | tailcoeff () |
| | CanonicalForm InternalPoly::tailcoeff (), int InternalPoly::taildegree () More...
|
| |
| CanonicalForm | coeff (int i) |
| | CanonicalForm InternalPoly::coeff ( int i ) More...
|
| |
| bool | inBaseDomain () const |
| |
| bool | inExtension () const |
| |
| bool | inCoeffDomain () const |
| |
| bool | inPolyDomain () const |
| |
| bool | inQuotDomain () const |
| |
| InternalCF * | genZero () |
| |
| InternalCF * | genOne () |
| |
| bool | isUnivariate () const |
| |
| InternalCF * | neg () |
| | InternalCF * InternalPoly::neg () More...
|
| |
| InternalCF * | invert () |
| |
| InternalCF * | tryInvert (const CanonicalForm &, bool &) |
| |
| int | comparesame (InternalCF *) |
| | comparesame(), comparecoeff() - compare with an InternalPoly. More...
|
| |
| InternalCF * | addsame (InternalCF *) |
| |
| InternalCF * | subsame (InternalCF *) |
| |
| InternalCF * | mulsame (InternalCF *) |
| |
| InternalCF * | tryMulsame (InternalCF *, const CanonicalForm &) |
| |
| InternalCF * | dividesame (InternalCF *) |
| |
| InternalCF * | modulosame (InternalCF *) |
| |
| InternalCF * | divsame (InternalCF *) |
| |
| InternalCF * | tryDivsame (InternalCF *, const CanonicalForm &, bool &) |
| |
| InternalCF * | modsame (InternalCF *) |
| |
| void | divremsame (InternalCF *, InternalCF *&, InternalCF *&) |
| |
| bool | divremsamet (InternalCF *, InternalCF *&, InternalCF *&) |
| |
| bool | tryDivremsamet (InternalCF *, InternalCF *&, InternalCF *&, const CanonicalForm &, bool &) |
| |
| int | comparecoeff (InternalCF *) |
| | comparecoeff() always returns 1 since CO is defined to be larger than anything which is a coefficient w.r.t. More...
|
| |
| InternalCF * | addcoeff (InternalCF *) |
| |
| InternalCF * | subcoeff (InternalCF *, bool) |
| |
| InternalCF * | mulcoeff (InternalCF *) |
| |
| InternalCF * | dividecoeff (InternalCF *, bool) |
| |
| InternalCF * | tryDividecoeff (InternalCF *, bool, const CanonicalForm &, bool &) |
| |
| InternalCF * | modulocoeff (InternalCF *, bool) |
| |
| InternalCF * | divcoeff (InternalCF *, bool) |
| |
| InternalCF * | tryDivcoeff (InternalCF *, bool, const CanonicalForm &, bool &) |
| |
| InternalCF * | modcoeff (InternalCF *, bool) |
| |
| void | divremcoeff (InternalCF *, InternalCF *&, InternalCF *&, bool) |
| |
| bool | divremcoefft (InternalCF *, InternalCF *&, InternalCF *&, bool) |
| |
| bool | tryDivremcoefft (InternalCF *, InternalCF *&, InternalCF *&, bool, const CanonicalForm &, bool &) |
| |
| int | sign () const |
| | int InternalPoly::sign () const More...
|
| |
| void * | operator new (size_t) |
| |
| void | operator delete (void *addr, size_t) |
| |
| | InternalCF () |
| |
| | InternalCF (const InternalCF &) |
| |
| virtual | ~InternalCF () |
| |
| int | deleteObject () |
| |
| InternalCF * | copyObject () |
| |
| virtual InternalCF * | deepCopyObject () const PVIRT_INTCF("deepCopyObject") |
| |
| virtual const char * | classname () const PVIRT_CHARCC("classname") |
| |
| virtual InternalCF * | genZero () PVIRT_INTCF("genZero") |
| |
| virtual InternalCF * | genOne () PVIRT_INTCF("genOne") |
| |
| virtual int | level () const |
| |
| virtual int | levelcoeff () const |
| |
| virtual int | type () const |
| |
| virtual Variable | variable () const |
| |
| virtual void | print (OSTREAM &, char *) PVIRT_VOID("print") |
| |
| virtual bool | inBaseDomain () const |
| |
| virtual bool | inExtension () const |
| |
| virtual bool | inCoeffDomain () const |
| |
| virtual bool | inPolyDomain () const |
| |
| virtual bool | inQuotDomain () const |
| |
| virtual bool | isZero () const |
| |
| virtual bool | isOne () const |
| | bool InternalCF::isOne, isZero () const More...
|
| |
| virtual bool | isUnivariate () const |
| |
| virtual long | intval () const |
| |
| virtual int | intmod (int) const |
| |
| virtual int | sign () const PVIRT_INT("sign") |
| |
| virtual InternalCF * | num () |
| | InternalCF * InternalCF::num (), den () More...
|
| |
| virtual InternalCF * | den () |
| |
| virtual InternalCF * | neg () PVIRT_INTCF("neg") |
| |
| virtual InternalCF * | invert () |
| |
| virtual InternalCF * | tryInvert (const CanonicalForm &, bool &) |
| |
| virtual int | comparesame (InternalCF *) PVIRT_INT("comparesame") |
| |
| virtual int | comparecoeff (InternalCF *) PVIRT_INT("comparecoeff") |
| |
| virtual InternalCF * | addsame (InternalCF *) PVIRT_INTCF("addsame") |
| |
| virtual InternalCF * | subsame (InternalCF *) PVIRT_INTCF("subsame") |
| |
| virtual InternalCF * | mulsame (InternalCF *) PVIRT_INTCF("mulsame") |
| |
| virtual InternalCF * | tryMulsame (InternalCF *, const CanonicalForm &) |
| |
| virtual InternalCF * | dividesame (InternalCF *) PVIRT_INTCF("dividesame") |
| |
| virtual InternalCF * | modulosame (InternalCF *) PVIRT_INTCF("modulosame") |
| |
| virtual InternalCF * | divsame (InternalCF *) PVIRT_INTCF("divsame") |
| |
| virtual InternalCF * | tryDivsame (InternalCF *, const CanonicalForm &, bool &) |
| |
| virtual InternalCF * | modsame (InternalCF *) PVIRT_INTCF("modsame") |
| |
| virtual void | divremsame (InternalCF *, InternalCF *&, InternalCF *&) PVIRT_VOID("divremsame") |
| |
| virtual bool | divremsamet (InternalCF *, InternalCF *&, InternalCF *&) PVIRT_BOOL("divremsamet") |
| |
| virtual bool | tryDivremsamet (InternalCF *, InternalCF *&, InternalCF *&, const CanonicalForm &, bool &) |
| |
| virtual InternalCF * | addcoeff (InternalCF *) PVIRT_INTCF("addcoeff") |
| |
| virtual InternalCF * | subcoeff (InternalCF *, bool) PVIRT_INTCF("subcoeff") |
| |
| virtual InternalCF * | mulcoeff (InternalCF *) PVIRT_INTCF("mulcoeff") |
| |
| virtual InternalCF * | dividecoeff (InternalCF *, bool) PVIRT_INTCF("dividecoeff") |
| |
| virtual InternalCF * | tryDividecoeff (InternalCF *, bool, const CanonicalForm &, bool &) |
| |
| virtual InternalCF * | modulocoeff (InternalCF *, bool) PVIRT_INTCF("dividecoeff") |
| |
| virtual InternalCF * | divcoeff (InternalCF *, bool) PVIRT_INTCF("divcoeff") |
| |
| virtual InternalCF * | tryDivcoeff (InternalCF *, bool, const CanonicalForm &, bool &) |
| |
| virtual InternalCF * | modcoeff (InternalCF *, bool) PVIRT_INTCF("modcoeff") |
| |
| virtual void | divremcoeff (InternalCF *, InternalCF *&, InternalCF *&, bool) PVIRT_VOID("divremcoeff") |
| |
| virtual bool | divremcoefft (InternalCF *, InternalCF *&, InternalCF *&, bool) PVIRT_BOOL("divremcoefft") |
| |
| virtual bool | tryDivremcoefft (InternalCF *, InternalCF *&, InternalCF *&, bool, const CanonicalForm &, bool &) |
| |
| virtual InternalCF * | bgcdsame (const InternalCF *const) const |
| | InternalCF * InternalCF::bgcdsame, bgcdcoeff ( const InternalCF * const ) More...
|
| |
| virtual InternalCF * | bgcdcoeff (const InternalCF *const) |
| |
| virtual InternalCF * | bextgcdsame (InternalCF *, CanonicalForm &, CanonicalForm &) |
| | InternalCF * InternalCF::bextgcdsame ( InternalCF *, CanonicalForm & a, CanonicalForm & b ) More...
|
| |
| virtual InternalCF * | bextgcdcoeff (InternalCF *, CanonicalForm &, CanonicalForm &) |
| |
| virtual InternalCF * | sqrt () |
| | InternalCF * InternalCF::sqrt () More...
|
| |
| virtual int | ilog2 () |
| | int InternalCF::ilog2 () More...
|
| |
| virtual CanonicalForm | lc () |
| | CanonicalForm InternalCF::lc (), Lc (), LC () More...
|
| |
| virtual CanonicalForm | Lc () |
| |
| virtual CanonicalForm | LC () |
| |
| virtual CanonicalForm | coeff (int i) |
| | CanonicalForm InternalCF::coeff ( int i ) More...
|
| |
| virtual int | degree () |
| | int InternalCF::degree () More...
|
| |
| virtual int | taildegree () |
| |
| virtual CanonicalForm | tailcoeff () |
| | CanonicalForm InternalCF::tailcoeff (), int InternalCF::taildegree () More...
|
| |
| void * | operator new (size_t size) throw (std::bad_alloc) |
| |
| void | operator delete (void *block) throw () |
| |
| void * | operator new[] (size_t size) throw (std::bad_alloc) |
| |
| void | operator delete[] (void *block) throw () |
| |
| void * | operator new (size_t size, const std::nothrow_t &) throw () |
| |
| void * | operator new[] (size_t size, const std::nothrow_t &) throw () |
| |
factory's class for polynomials
polynomials are represented as a linked list termList, factory uses a sparse distributive representation of polynomials, i.e. each poly is viewed as a univariate poly in its main variable CanonicalForm::mvar() over a (polynomial) ring
Definition at line 71 of file int_poly.h.
| int InternalPoly::comparesame |
( |
InternalCF * |
acoeff | ) |
|
|
virtual |
comparesame(), comparecoeff() - compare with an InternalPoly.
comparesame() compares the coefficient vectors of f=CO and g=acoeff w.r.t to a lexicographic order in the following way: f < g iff there exists an 0 <= i <= max(deg(f),deg(g)) s.t. i) f[j] = g[j] for all i < j <= max(deg(f),deg(g)) and ii) g[i] occurs in g (i.e. is not equal to zero) and f[i] does not occur in f or f[i] < g[i] if f[i] occurs where f[i] denotes the coefficient to the power x^i of f.
As usual, comparesame() returns 1 if CO is larger than c, 0 if CO equals c, and -1 if CO is less than c. However, this function is optimized to test on equality since this is its most important and frequent usage.
See the respective ‘CanonicalForm’-methods for an explanation why we define such a strange (but total) ordering on polynomials.
- See also
- CanonicalForm::operator <(), CanonicalForm::operator ==()
Reimplemented from InternalCF.
Definition at line 990 of file int_poly.cc.
991{
994
995 if ( this == apoly )
996 return 0;
997 else
998 {
1001 for ( ; cursor1 && cursor2; cursor1 = cursor1->
next, cursor2 = cursor2->
next )
1002
1003
1004
1005
1006 if ( (cursor1->
exp != cursor2->exp) || (cursor1->
coeff != cursor2->coeff) )
1007 {
1008 if ( cursor1->
exp > cursor2->exp )
1009 return 1;
1010 else if ( cursor1->
exp < cursor2->exp )
1011 return -1;
1012 else if ( cursor1->
coeff > cursor2->coeff )
1013 return 1;
1014 else
1015 return -1;
1016 }
1017
1018 if ( cursor1 == cursor2 )
1019 return 0;
1020 else if ( cursor1 != 0 )
1021 return 1;
1022 else
1023 return -1;
1024 }
1025}
virtual int level() const