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