30 class CountingConsumer :
52 virtual void beginConsuming() {
60 virtual void consume(
const vector<mpz_class>& term) {
64 virtual void consume(
const BigIdeal& ideal) {
70 virtual void consume(
const mpz_class& coef,
const Term& term) {
74 virtual void consume(
const mpz_class& coef,
80 virtual void consume(
const mpz_class& coef,
81 const vector<mpz_class>& term) {
87 _termCount +=
poly.getTermCount();
91 virtual void doneConsuming() {
102 IOHandlerImpl(staticGetName(),
"Writes the number of output terms.") {
113 return new CountingConsumer(
out);
117 return new CountingConsumer(
out);
void nameFactoryRegister(NameFactory< AbstractProduct > &factory)
Registers the string returned by ConcreteProduct::getStaticName() to a function that default-construc...
size_t getGeneratorCount() const
static const DataType & getMonomialIdealListType()
Returns the one and only instance for monomial ideal lists.
static const DataType & getMonomialIdealType()
Returns the one and only instance for monomial ideals.
static const DataType & getPolynomialType()
Returns the one and only instance for polynomials.
virtual CoefBigTermConsumer * doCreatePolynomialWriter(FILE *out)
virtual BigTermConsumer * doCreateIdealWriter(FILE *out)
static const char * staticGetName()
virtual void doWriteTerm(const vector< mpz_class > &term, const VarNames &names, FILE *out)
This class contains a minimum level of functionality that makes it more convenient to derive from tha...
void registerOutput(const DataType &type)
Specify that output of the argument type is supported.
TermTranslator handles translation between terms whose exponents are infinite precision integers and ...
Term represents a product of variables which does not include a coefficient.
Defines the variables of a polynomial ring and facilities IO involving them.