Go to the documentation of this file.
17 #ifndef TERM_TRANSLATOR_GUARD
18 #define TERM_TRANSLATOR_GUARD
59 TermTranslator(
const vector<BigIdeal*>& bigIdeals, vector<Ideal*>& ideals);
111 void dualize(
const vector<mpz_class>& a);
121 void print(ostream& out)
const;
128 void initialize(
const vector<BigIdeal*>& bigIdeals,
bool sortVars);
void print(ostream &out) const
const char * getVarExponentString(size_t variable, Exponent exponent) const
As getExponent, except the string "var^e" is returned or null if the exponent is zero,...
void swapVariables(size_t a, size_t b)
vector< vector< mpz_class > > _exponents
bool lessThanReverseLex(const Exponent *a, const Exponent *b) const
void decrement()
Replaces var^v by var^(v-1).
vector< vector< const char * > > _stringVarExponents
TermTranslator handles translation between terms whose exponents are infinite precision integers and ...
const VarNames & getNames() const
const mpz_class & getExponent(size_t variable, Exponent exponent) const
This method translates from IDs to arbitrary precision integers.
size_t getVarCount() const
vector< vector< const char * > > _stringExponents
void dualize(const vector< mpz_class > &a)
Replaces var^v by var^(a[i] - v) except that var^0 is left alone.
void shrinkBigIdeal(const BigIdeal &bigIdeal, Ideal &ideal) const
TermTranslator(size_t varCount, size_t upToExponent)
Constructs a translator of varCount variables that translates each number to itself,...
bool operator()(const Term &a, const Term &b) const
ostream & operator<<(ostream &out, const TermTranslator &translator)
Term represents a product of variables which does not include a coefficient.
const TermTranslator & _translator
TermTranslator & operator=(const TermTranslator &translator)
const char * getExponentString(size_t variable, Exponent exponent) const
as getExponent, except the string "e" is returned, where e is the exponent.
Exponent shrinkExponent(size_t var, const mpz_class &exponent) const
TranslatedReverseLexComparator(const TermTranslator &translator)
A predicate that sorts according to reverse lexicographic order on the translated values of a term.
Exponent getMaxId(size_t variable) const
The assigned IDs are those in the range [0, getMaxId(var)].
Represents a monomial ideal with int exponents.
void initialize(const vector< BigIdeal * > &bigIdeals, bool sortVars)
Defines the variables of a polynomial ring and facilities IO involving them.
void addPurePowersAtInfinity(Ideal &ideal) const
Adds a generator of the form v^e, e > 0, for any variable v where generator of that form is not alrea...
void renameVariables(const VarNames &names)
void setToZeroOne(TermTranslator &translator)
void makeStrings(bool includeVar) const
void setInfinityPowersToZero(Ideal &ideal) const
The method addPurePowersAtInfinity adds high exponents that map to zero.