17 #ifndef TERM_GRADER_GUARD
18 #define TERM_GRADER_GUARD
29 TermGrader(
const vector<mpz_class>& varDegrees,
43 mpz_class& degree)
const;
49 const Term& dominator,
50 mpz_class& bound)
const;
60 const Term& dominator)
const;
71 const mpz_class& value,
bool strict =
true)
const;
78 const mpz_class& value,
bool strict =
83 mpz_class& degree)
const;
92 const mpz_class& maxDegree)
const;
101 const mpz_class& maxDegree)
const;
110 void print(ostream& out)
const;
ostream & operator<<(ostream &out, const TermGrader &grader)
A TermGrader assigns a value, the degree, to each monomial.
void getIncrementedDegree(const Term &term, const Projection &projection, mpz_class °ree) const
void print(ostream &out) const
Exponent getLargestLessThan2(size_t var, const mpz_class &value, bool strict=true) const
Returns the index of the largest stored exponent of var that is less than value.
mpz_class getDegree(const Term &term) const
Returns the degree of term.
size_t getVarCount() const
Exponent getMaxExponent(size_t var) const
TermGrader(const vector< mpz_class > &varDegrees, const TermTranslator &translator)
bool getMaxIndexLessThan(size_t var, Exponent from, Exponent to, Exponent &index, const mpz_class &maxDegree) const
Finds maximal index in [from, to] to such that degree(t) <= maxDegree.
void getUpperBound(const Term &divisor, const Term &dominator, mpz_class &bound) const
Assigns to bound the degree of the largest term v such that divisor divides v and v divides dominator...
bool getMinIndexLessThan(size_t var, Exponent from, Exponent to, Exponent &index, const mpz_class &maxDegree) const
Finds minimal index in [from, to] to such that degree(t) <= maxDegree.
int getGradeSign(size_t var) const
Returns 1 if the grade strictly increases with the exponent of var, returns -1 if it strictly decreas...
const mpz_class & getGrade(size_t var, Exponent exponent) const
vector< vector< mpz_class > > _grades
TermTranslator handles translation between terms whose exponents are infinite precision integers and ...
Term represents a product of variables which does not include a coefficient.