36 namespace N = NewMonos;
45 fputs(
"(monomial-ideal-with-order\n ", getFile());
52 fputs(
"\n ", getFile());
58 fputs(
"\n ", getFile());
63 fputs(
"\n)\n", getFile());
72 IOHandlerImpl(staticGetName(),
"Newer format used by the program Monos.") {
112 }
while (in.
match(
'('));
116 fputs(
"(lex-order", out);
117 for (
unsigned int i = 0; i < names.
getVarCount(); ++i) {
119 fputs(names.
getName(i).c_str(), out);
126 while (!in.
match(
')'))
131 in.
expect(
"monomial-ideal-with-order");
139 while (!in.
match(
')'))
static const DataType & getMonomialIdealListType()
Returns the one and only instance for monomial ideal lists.
virtual BigTermConsumer * doCreateIdealWriter(FILE *out)
void registerOutput(const DataType &type)
Specify that output of the argument type is supported.
void writeRing(const VarNames &names, FILE *out)
Defines the variables of a polynomial ring and facilities IO involving them.
virtual void doWriteHeader(bool first)
virtual void doWriteEmptyList()
void doReadIdeals(Scanner &in, InputConsumer &consumer)
void readIdealNoLeftParen(Scanner &in, InputConsumer &consumer)
NewMonosIdealWriter(FILE *out)
void addVarSyntaxCheckUnique(const Scanner &in, const string &name)
As addvar, except it reports a syntax error if name is already a variable.
This class offers an input interface which is more convenient and for some purposes more efficient th...
virtual void doWriteTerm(const vector< mpz_class > &term, bool first)
virtual void doWriteTerm(const Term &term, const TermTranslator &translator, bool first)
virtual void doWriteTerm(const vector< mpz_class > &term, const VarNames &names, FILE *out)
static const char * staticGetName()
void doReadIdeal(Scanner &in, InputConsumer &consumer)
void registerInput(const DataType &type)
Specify that input of the argument type is supported.
virtual void doWriteFooter(bool wasZeroIdeal)
void readRingNoLeftParen(Scanner &in, VarNames &names)
This class contains a minimum level of functionality that makes it more convenient to derive from tha...
bool peek(char character)
Skips whitespace and returns true if the next character is equal to the parameter(s).
const char * readIdentifier()
The returned string is only valid until the next method on this object gets called.
TermTranslator handles translation between terms whose exponents are infinite precision integers and ...
void expect(char expected)
Require the next character to be equal to expected.
virtual void doReadTerm(Scanner &in, InputConsumer &consumer)
static const DataType & getMonomialIdealType()
Returns the one and only instance for monomial ideals.
void writeTermProduct(const Term &term, const TermTranslator &translator, FILE *out)
size_t getVarCount() const
Returns the current number of variables.
const string & getName(size_t index) const
The returned reference can become invalid next time addVar is called.
Term represents a product of variables which does not include a coefficient.
bool match(char c)
Return true if the next character is c, and in that case skip past it.