|
Frobby 0.10.0
|
#include <TermTranslator.h>
Public Member Functions | |
| TermTranslator (size_t varCount, size_t upToExponent) | |
| TermTranslator (const BigIdeal &bigIdeal, Ideal &ideal, bool sortVars=true) | |
| TermTranslator (const vector< BigIdeal * > &bigIdeals, vector< Ideal * > &ideals) | |
| TermTranslator (const TermTranslator &translator) | |
| TermTranslator & | operator= (const TermTranslator &translator) |
| const mpz_class & | getExponent (size_t variable, Exponent exponent) const |
| const mpz_class & | getExponent (size_t variable, const Term &term) const |
| const char * | getVarExponentString (size_t variable, Exponent exponent) const |
| const char * | getExponentString (size_t variable, Exponent exponent) const |
| Exponent | getMaxId (size_t variable) const |
| void | addPurePowersAtInfinity (Ideal &ideal) const |
| void | setInfinityPowersToZero (Ideal &ideal) const |
| const VarNames & | getNames () const |
| size_t | getVarCount () const |
| void | dualize (const vector< mpz_class > &a) |
| void | decrement () |
| void | renameVariables (const VarNames &names) |
| void | swapVariables (size_t a, size_t b) |
| bool | lessThanReverseLex (const Exponent *a, const Exponent *b) const |
| void | print (ostream &out) const |
| string | toString () const |
TermTranslator handles translation between terms whose exponents are infinite precision integers and terms whose exponents are 32 bit integers.
This is done by assigning the big integers IDs that are 32 bit integers such that the assignment of IDs preserves order of exponents for each variable.
The translation is done at the level of whole ideals.
The big integer 0 is always assigned the ID 0.
| TermTranslator::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.
Translates bigIdeal into ideal, and construct a translator to translate back. sortVars indicates whether or not the order of the variable names should be sorted.
| TermTranslator::TermTranslator | ( | const vector< BigIdeal * > & | bigIdeals, |
| vector< Ideal * > & | ideals ) |
Translates bigIdeals into ideals, while constructing a translator to translate back. The variable names will be sorted, and the ideals will be embedded in a ring with the union of all variables present in bigIdeals.
| void TermTranslator::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 already present. e is chosen to be larger than any exponent (i.e. ID) already present, and it maps to 0. Note that this does NOT preserve order - the highest ID always maps to 0. The reason for this is that this is what is needed for computing irreducible decompositions.
| void TermTranslator::decrement | ( | ) |
Replaces var^v by var^(v-1).
| void TermTranslator::dualize | ( | const vector< mpz_class > & | a | ) |
Replaces var^v by var^(a[i] - v) except that var^0 is left alone.
| const mpz_class & TermTranslator::getExponent | ( | size_t | variable, |
| const Term & | term ) const |
This method translates from IDs to arbitrary precision integers.
| const mpz_class & TermTranslator::getExponent | ( | size_t | variable, |
| Exponent | exponent ) const |
This method translates from IDs to arbitrary precision integers.
| const char * TermTranslator::getExponentString | ( | size_t | variable, |
| Exponent | exponent ) const |
as getExponent, except the string "e" is returned, where e is the exponent.
| Exponent TermTranslator::getMaxId | ( | size_t | variable | ) | const |
The assigned IDs are those in the range [0, getMaxId(var)]. As a special case, getMaxId(var) maps to the same exponent as 0 does.
| const char * TermTranslator::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.
| void TermTranslator::setInfinityPowersToZero | ( | Ideal & | ideal | ) | const |
The method addPurePowersAtInfinity adds high exponents that map to zero. This method replaces those high powers with the power zero.