51 virtual void consume(
const vector<mpz_class>& term) {
55 for (
size_t var = 0; var < term.size(); ++var)
56 if (
_lcm[var] < term[var])
57 _lcm[var] = term[var];
71 const vector<mpz_class>&
getLcm()
const {
77 return *max_element(
_lcm.begin(),
_lcm.end());
89 "Display information about the input ideal.",
90 "Display information about input ideal. This is useful for getting a quick\n"
91 "impression of how the ideal looks like, and it can be used in scripts\n"
92 "that need information about the ideal.",
99 "If non-zero, then print a summary of the ideal to the error output\n"
100 "stream. A higher summary level results in more expensive analysis in\n"
101 "order to provide more information. Currently levels 0, 1 and 2 are\n"
107 "Print the least common multiple of the generators.",
112 "Print the number of variables.",
117 "Print the number of generators.",
120 _printMaximumExponent
122 "Print the largest exponent that appears in the input file",
127 "Print 1 if the ideal has no non-minimal generators. Print 0 otherwise.",
180 fputs(
"1\n", stdout);
182 fputs(
"0\n", stdout);
196 output.get(), stdout);
207 fputs(
"0\n", stdout);
213 fprintf(stdout,
"%lu generators\n",
215 fprintf(stdout,
"%lu variables\n",
BoolParameter _printMaximumExponent
virtual void consume(const vector< mpz_class > &term)=0
void readIdeal(Scanner &in, BigTermConsumer &consumer)
Read an ideal from in and feed it to consumer.
void analyzeIdeal(BigIdeal &ideal) const
IntegerParameter _summaryLevel
BoolParameter _printVarCount
size_t getVarCount() const
Returns the current number of variables.
virtual void obtainParameters(vector< Parameter * > ¶meters)
const mpz_class & getMaximumExponent() const
BoolParameter _printActions
Defines the variables of a polynomial ring and facilities IO involving them.
size_t getGeneratorCount() const
The intention of this class is to describe the different kinds of mathematical structures that Frobby...
void autoDetectInputFormat(Scanner &in)
If using the input format, this must be called before validating the ideals, since the auto detect fo...
virtual void consume(const Term &term, const TermTranslator &translator)
BoolParameter _printMinimal
void validateFormats() const
unsigned int getValue() const
void printAnalysis(FILE *out, BigIdeal &ideal)
auto_ptr< IOHandler > createOutputHandler() const
virtual void obtainParameters(vector< Parameter * > ¶meters)
This class offers an input interface which is more convenient and for some purposes more efficient th...
static const char * staticGetName()
A facade for performing operations on BigIdeal.
const vector< mpz_class > & getLcm() const
virtual void beginConsuming()
Tell the consumer to begin consuming an ideal.
void obtainParameters(vector< Parameter * > ¶meters)
size_t getGeneratorCount() const
virtual void consumeRing(const VarNames &names)
Tell the consumer which ring is being used.
const VarNames & getNames() const
virtual void doneConsuming()
Must be called once after each time beginConsuming has been called.
TermTranslator handles translation between terms whose exponents are infinite precision integers and ...
const string & getInputFormat() const
A facade for input and output of mathematical objects.
bool requiresWholeIdeal() const
void sortAllAndMinimize(BigIdeal &bigIdeal)
Remove redundant generators from ideal.
BoolParameter _printGeneratorCount
void writeTerm(const vector< mpz_class > &term, const VarNames &names, IOHandler *handler, FILE *out)
virtual void consume(const vector< mpz_class > &term)
Term represents a product of variables which does not include a coefficient.
void analyzeStreaming(AnalyzeConsumer &consumer) const