![]() |
My Project
|
factory's class for polynomials More...
#include <int_poly.h>
Static Public Attributes | |
| static const omBin | InternalPoly_bin = omGetSpecBin(sizeof(InternalPoly)) |
Private Member Functions | |
| InternalPoly (termList, termList, const Variable &) | |
Private Attributes | |
| termList | firstTerm |
| termList | lastTerm |
| Variable | var |
Friends | |
| class | CFIterator |
Additional Inherited Members | |
| Protected Member Functions inherited from InternalCF | |
| int | getRefCount () |
| void | incRefCount () |
| int | decRefCount () |
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.
Definition at line 46 of file int_poly.cc.
| InternalPoly::InternalPoly | ( | ) |
Definition at line 53 of file int_poly.cc.
| InternalPoly::InternalPoly | ( | const Variable & | v, |
| const int | e, | ||
| const CanonicalForm & | c ) |
| InternalPoly::InternalPoly | ( | const InternalPoly & | ) |
Definition at line 65 of file int_poly.cc.
| InternalPoly::~InternalPoly | ( | ) |
Definition at line 70 of file int_poly.cc.
|
virtual |
Reimplemented from InternalCF.
Definition at line 1040 of file int_poly.cc.
|
virtual |
Reimplemented from InternalCF.
Definition at line 286 of file int_poly.cc.
|
staticprivate |
Definition at line 1924 of file int_poly.cc.
|
staticprivate |
Definition at line 2169 of file int_poly.cc.
|
inlinevirtual |
Reimplemented from InternalCF.
Definition at line 96 of file int_poly.h.
|
virtual |
CanonicalForm InternalPoly::coeff ( int i ).
Reimplemented from InternalCF.
Definition at line 162 of file int_poly.cc.
|
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.
**/ int InternalPoly::comparesame ( InternalCF * acoeff ) { ASSERT( ! ::is_imm( acoeff ) && acoeff->level() > LEVELBASE, "incompatible base coefficients" ); InternalPoly* apoly = (InternalPoly*)acoeff; check on triviality if ( this == apoly ) return 0; else { termList cursor1 = firstTerm; termList cursor2 = apoly->firstTerm; for ( ; cursor1 && cursor2; cursor1 = cursor1->next, cursor2 = cursor2->next ) { we test on inequality of coefficients at this point instead of testing on "less than" at the last else' in the enclosed if' statement since a test on inequality in general is cheaper if ( cursor1->exp > cursor2->exp ) return 1; else if ( cursor1->exp < cursor2->exp ) return -1; if ( (cursor1->coeff != cursor2->coeff) ) { if ( cursor1->coeff > cursor2->coeff ) return 1; else return -1; } } check trailing terms if ( cursor1 == cursor2 ) return 0; else if ( cursor1 != 0 ) return 1; else return -1; } }
/** comparecoeff() always returns 1 since CO is defined to be larger than anything which is a coefficient w.r.t. CO.
Reimplemented from InternalCF.
Definition at line 1034 of file int_poly.cc.
|
virtual |
Reimplemented from InternalCF.
|
staticprivate |
Definition at line 1832 of file int_poly.cc.
|
virtual |
Reimplemented from InternalCF.
Definition at line 76 of file int_poly.cc.
|
staticprivate |
Definition at line 1875 of file int_poly.cc.
|
virtual |
int InternalPoly::degree ()
Reimplemented from InternalCF.
Definition at line 100 of file int_poly.cc.
|
virtual |
Reimplemented from InternalCF.
Definition at line 1401 of file int_poly.cc.
|
virtual |
Reimplemented from InternalCF.
Definition at line 1219 of file int_poly.cc.
|
virtual |
|
staticprivate |
Definition at line 2051 of file int_poly.cc.
|
virtual |
Reimplemented from InternalCF.
Definition at line 1654 of file int_poly.cc.
|
virtual |
Reimplemented from InternalCF.
Definition at line 1691 of file int_poly.cc.
|
virtual |
Reimplemented from InternalCF.
Definition at line 765 of file int_poly.cc.
|
virtual |
Reimplemented from InternalCF.
Definition at line 817 of file int_poly.cc.
|
virtual |
Reimplemented from InternalCF.
Definition at line 498 of file int_poly.cc.
|
staticprivate |
Definition at line 2080 of file int_poly.cc.
|
staticprivate |
Definition at line 1900 of file int_poly.cc.
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
virtual |
Reimplemented from InternalCF.
Definition at line 247 of file int_poly.cc.
|
virtual |
Reimplemented from InternalCF.
Definition at line 84 of file int_poly.cc.
|
virtual |
Reimplemented from InternalCF.
Definition at line 138 of file int_poly.cc.
|
virtual |
Reimplemented from InternalCF.
Definition at line 129 of file int_poly.cc.
|
virtual |
Reimplemented from InternalCF.
Definition at line 120 of file int_poly.cc.
|
inlinevirtual |
|
virtual |
Reimplemented from InternalCF.
Definition at line 1590 of file int_poly.cc.
|
virtual |
Reimplemented from InternalCF.
Definition at line 693 of file int_poly.cc.
|
staticprivate |
Definition at line 2140 of file int_poly.cc.
|
virtual |
Reimplemented from InternalCF.
Definition at line 1576 of file int_poly.cc.
|
virtual |
|
staticprivate |
Definition at line 2184 of file int_poly.cc.
|
virtual |
Reimplemented from InternalCF.
Definition at line 1183 of file int_poly.cc.
|
virtual |
Reimplemented from InternalCF.
Definition at line 366 of file int_poly.cc.
|
staticprivate |
|
virtual |
InternalCF * InternalPoly::neg ().
Reimplemented from InternalCF.
Definition at line 231 of file int_poly.cc.
|
staticprivate |
|
inline |
Definition at line 166 of file int_poly.h.
|
inline |
Definition at line 160 of file int_poly.h.
|
virtual |
Reimplemented from InternalCF.
Definition at line 179 of file int_poly.cc.
|
staticprivate |
Definition at line 2268 of file int_poly.cc.
|
virtual |
int InternalPoly::sign () const
Reimplemented from InternalCF.
Definition at line 110 of file int_poly.cc.
|
virtual |
Reimplemented from InternalCF.
Definition at line 1097 of file int_poly.cc.
|
virtual |
Reimplemented from InternalCF.
Definition at line 326 of file int_poly.cc.
|
virtual |
CanonicalForm InternalPoly::tailcoeff (), int InternalPoly::taildegree ().
Reimplemented from InternalCF.
Definition at line 147 of file int_poly.cc.
|
virtual |
Reimplemented from InternalCF.
Definition at line 153 of file int_poly.cc.
|
virtual |
Reimplemented from InternalCF.
Definition at line 1477 of file int_poly.cc.
|
virtual |
Reimplemented from InternalCF.
Definition at line 1305 of file int_poly.cc.
|
virtual |
Reimplemented from InternalCF.
Definition at line 1757 of file int_poly.cc.
|
virtual |
Reimplemented from InternalCF.
Definition at line 883 of file int_poly.cc.
|
virtual |
Reimplemented from InternalCF.
Definition at line 584 of file int_poly.cc.
|
staticprivate |
Definition at line 2109 of file int_poly.cc.
|
virtual |
Reimplemented from InternalCF.
Definition at line 264 of file int_poly.cc.
|
virtual |
Reimplemented from InternalCF.
Definition at line 428 of file int_poly.cc.
|
inlinevirtual |
|
friend |
Definition at line 171 of file int_poly.h.
|
private |
Definition at line 73 of file int_poly.h.
|
static |
Definition at line 159 of file int_poly.h.
|
private |
Definition at line 73 of file int_poly.h.
|
private |
Definition at line 74 of file int_poly.h.