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.",
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.",
139 _io.obtainParameters(parameters);
145 _io.autoDetectInputFormat(in);
146 _io.validateFormats();
180 fputs(
"1\n", stdout);
182 fputs(
"0\n", stdout);
194 unique_ptr<IOHandler> output =
_io.createOutputHandler();
196 output.get(), stdout);
207 fputs(
"0\n", stdout);
213 fprintf(stdout,
"%lu generators\n",
215 fprintf(stdout,
"%lu variables\n",
BoolParameter _printActions
Action(const char *name, const char *shortDescription, const char *description, bool acceptsNonParameter)
virtual void obtainParameters(vector< Parameter * > ¶meters)
BoolParameter _printMaximumExponent
BoolParameter _printGeneratorCount
BoolParameter _printMinimal
virtual void obtainParameters(vector< Parameter * > ¶meters)
bool requiresWholeIdeal() const
static const char * staticGetName()
void analyzeIdeal(BigIdeal &ideal) const
IntegerParameter _summaryLevel
BoolParameter _printVarCount
void analyzeStreaming(AnalyzeConsumer &consumer) const
const VarNames & getNames() const
const mpz_class & getMaximumExponent() const
size_t getGeneratorCount() const
const vector< mpz_class > & getLcm() const
virtual void consume(const Term &term, const TermTranslator &translator)
virtual void consumeRing(const VarNames &names)
Tell the consumer which ring is being used.
virtual void beginConsuming()
Tell the consumer to begin consuming an ideal.
virtual void doneConsuming()
Must be called once after each time beginConsuming has been called.
virtual void consume(const vector< mpz_class > &term)
size_t getGeneratorCount() const
virtual void consume(const vector< mpz_class > &term)=0
The intention of this class is to describe the different kinds of mathematical structures that Frobby...
A facade for input and output of mathematical objects.
void writeTerm(const vector< mpz_class > &term, const VarNames &names, IOHandler *handler, FILE *out)
void readIdeal(Scanner &in, BigTermConsumer &consumer)
Read an ideal from in and feed it to consumer.
A facade for performing operations on BigIdeal.
void sortAllAndMinimize(BigIdeal &bigIdeal)
Remove redundant generators from ideal.
void printAnalysis(FILE *out, BigIdeal &ideal)
This class offers an input interface which is more convenient and for some purposes more efficient th...
void expectEOF()
Require that there is no more input.
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.
size_t getVarCount() const
Returns the current number of variables.
This header file includes common definitions and is included as the first line of code in every imple...