|
| 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 ()
|
|
CanonicalForm | lc () |
|
CanonicalForm | Lc () |
|
CanonicalForm | LC () |
|
int | taildegree () |
|
CanonicalForm | tailcoeff () |
| CanonicalForm InternalPoly::tailcoeff (), int InternalPoly::taildegree ()
|
|
CanonicalForm | coeff (int i) |
| CanonicalForm InternalPoly::coeff ( int i )
|
|
void | print (OSTREAM &, char *) |
|
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 ()
|
|
InternalCF * | invert () |
|
InternalCF * | tryInvert (const CanonicalForm &, bool &) |
|
int | comparesame (InternalCF *) |
| comparesame(), comparecoeff() - compare with an InternalPoly.
|
|
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.
|
|
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
|
|
void * | operator new (size_t) |
|
void | operator delete (void *addr, size_t) |
|
| InternalCF () |
|
| InternalCF (const InternalCF &) |
|
virtual | ~InternalCF () |
|
int | deleteObject () |
|
InternalCF * | copyObject () |
|
virtual int | levelcoeff () const |
|
virtual int | type () const |
|
virtual bool | isZero () const |
|
virtual bool | isOne () const |
| bool InternalCF::isOne, isZero () const
|
|
virtual long | intval () const |
|
virtual int | intmod (int) const |
|
virtual InternalCF * | num () |
| InternalCF * InternalCF::num (), den ()
|
|
virtual InternalCF * | den () |
|
virtual InternalCF * | bgcdsame (const InternalCF *const) const |
| InternalCF * InternalCF::bgcdsame, bgcdcoeff ( const InternalCF * const )
|
|
virtual InternalCF * | bgcdcoeff (const InternalCF *const) |
|
virtual InternalCF * | bextgcdsame (InternalCF *, CanonicalForm &, CanonicalForm &) |
| InternalCF * InternalCF::bextgcdsame ( InternalCF *, CanonicalForm & a, CanonicalForm & b )
|
|
virtual InternalCF * | bextgcdcoeff (InternalCF *, CanonicalForm &, CanonicalForm &) |
|
virtual InternalCF * | sqrt () |
| InternalCF * InternalCF::sqrt ()
|
|
virtual int | ilog2 () |
| int InternalCF::ilog2 ()
|
|
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 () |
|
|
static termList | copyTermList (termList, termList &, bool negate=false) |
|
static termList | deepCopyTermList (termList, termList &) |
|
static void | freeTermList (termList) |
|
static void | negateTermList (termList) |
|
static termList | addTermList (termList, termList, termList &, bool negate) |
|
static void | mulTermList (termList, const CanonicalForm &, const int) |
|
static termList | divideTermList (termList, const CanonicalForm &, termList &) |
|
static termList | divTermList (termList, const CanonicalForm &, termList &) |
|
static termList | tryDivTermList (termList, const CanonicalForm &, termList &, const CanonicalForm &, bool &) |
|
static termList | modTermList (termList, const CanonicalForm &, termList &) |
|
static void | appendTermList (termList &, termList &, const CanonicalForm &, const int) |
|
static termList | mulAddTermList (termList theList, termList aList, const CanonicalForm &c, const int exp, termList &lastTerm, bool negate) |
|
static termList | reduceTermList (termList first, termList redterms, termList &last) |
|
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
1007 if ( cursor1->
exp > cursor2->exp )
1008 return 1;
1009 else if ( cursor1->
exp < cursor2->exp )
1010 return -1;
1011 if ( (cursor1->
coeff != cursor2->coeff) )
1012 {
1013 if ( cursor1->
coeff > cursor2->coeff )
1014 return 1;
1015 else
1016 return -1;
1017 }
1018 }
1019
1020 if ( cursor1 == cursor2 )
1021 return 0;
1022 else if ( cursor1 != 0 )
1023 return 1;
1024 else
1025 return -1;
1026 }
1027}
virtual int level() const