101 const vector<mpz_class> term) {
118 vector<mpz_class>& bigTerm =
_coefTerms.back().term;
120 for (
size_t var = 0; var < term.
getVarCount(); ++var)
121 bigTerm.push_back(translator.
getExponent(var, term));
135 fputs(out.str().c_str(), file);
139 out <<
"/---- BigPolynomial of " <<
_coefTerms.size() <<
" terms:\n";
140 for (vector<BigCoefTerm>::const_iterator it =
_coefTerms.begin();
142 out <<
' ' << it->coef <<
" ";
143 for (vector<mpz_class>::const_iterator entry = it->term.begin();
144 entry != it->term.end(); ++entry)
145 out <<
' ' << *entry;
148 out <<
"----/ End of list.\n";
153 for (
size_t var = 0; var < a.
term.size(); ++var)
ostream & operator<<(ostream &out, const BigPolynomial &poly)
mpz_class & getLastCoef()
const vector< mpz_class > & getTerm(size_t index) const
size_t getTermCount() const
vector< BigCoefTerm > _coefTerms
void add(const mpz_class &coef, const vector< mpz_class > term)
size_t getVarCount() const
void clearAndSetNames(const VarNames &names)
const mpz_class & getCoef(size_t index) const
void renameVars(const VarNames &names)
void print(FILE *file) const
vector< mpz_class > & getLastTerm()
const VarNames & getNames() const
bool operator==(const BigPolynomial &poly) const
void sortTermsReverseLex()
static bool compareCoefTermsReverseLex(const BigCoefTerm &a, const BigCoefTerm &b)
TermTranslator handles translation between terms whose exponents are infinite precision integers and ...
const mpz_class & getExponent(size_t variable, Exponent exponent) const
This method translates from IDs to arbitrary precision integers.
size_t getVarCount() const
Term represents a product of variables which does not include a coefficient.
size_t getVarCount() const
Defines the variables of a polynomial ring and facilities IO involving them.
size_t getVarCount() const
Returns the current number of variables.
bool operator==(const BigCoefTerm &coefTerm) const
void getOrderedNames(VarNames &names)
void permute(vector< mpz_class > &term)