28 _consumerOwner(consumer),
29 _translator(translator) {
56 for (
size_t var = 0; var < term.
getVarCount(); ++var)
size_t getVarCount() const
virtual void consumeRing(const VarNames &names)
virtual void doneConsuming()
Defines the variables of a polynomial ring and facilities IO involving them.
virtual void consume(const mpz_class &coef, const Term &term)
const mpz_class & getExponent(size_t variable, Exponent exponent) const
This method translates from IDs to arbitrary precision integers.
size_t getVarCount() const
auto_ptr< CoefBigTermConsumer > _consumerOwner
const TermTranslator & _translator
void feedTo(CoefBigTermConsumer &consumer, bool inCanonicalOrder=false) const
TotalDegreeCoefTermConsumer(auto_ptr< CoefBigTermConsumer > consumer, const TermTranslator &translator)
virtual void beginConsuming()
TermTranslator handles translation between terms whose exponents are infinite precision integers and ...
void add(bool plus, const mpz_class &exponent)
Add +t^exponent or -t^exponent to the polynomial depending on whether plus is true or false...
CoefBigTermConsumer & _consumer
Term represents a product of variables which does not include a coefficient.