36 namespace N = NewMonos;
45 fputs(
"(monomial-ideal-with-order\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.
static const DataType & getMonomialIdealType()
Returns the one and only instance for monomial ideals.
This class contains a minimum level of functionality that makes it more convenient to derive from tha...
void registerInput(const DataType &type)
Specify that input of the argument type is supported.
void registerOutput(const DataType &type)
Specify that output of the argument type is supported.
const VarNames & getNames()
virtual void doReadTerm(Scanner &in, InputConsumer &consumer)
virtual BigTermConsumer * doCreateIdealWriter(FILE *out)
void doReadIdeal(Scanner &in, InputConsumer &consumer)
virtual void doWriteTerm(const vector< mpz_class > &term, const VarNames &names, FILE *out)
static const char * staticGetName()
void doReadIdeals(Scanner &in, InputConsumer &consumer)
virtual void doWriteEmptyList()
virtual void doWriteTerm(const Term &term, const TermTranslator &translator, bool first)
NewMonosIdealWriter(FILE *out)
virtual void doWriteTerm(const vector< mpz_class > &term, bool first)
virtual void doWriteHeader(bool first)
virtual void doWriteFooter(bool wasZeroIdeal)
This class offers an input interface which is more convenient and for some purposes more efficient th...
bool peek(char character)
Skips whitespace and returns true if the next character is equal to the parameter(s).
void expect(char expected)
Require the next character to be equal to expected.
const char * readIdentifier()
The returned string is only valid until the next method on this object gets called.
bool match(char c)
Return true if the next character is c, and in that case skip past it.
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.
const string & getName(size_t index) const
The returned reference can become invalid next time addVar is called.
void addVarSyntaxCheckUnique(const Scanner &in, const string &name)
As addvar, except it reports a syntax error if name is already a variable.
void writeRing(const VarNames &names, FILE *out)
void readRingNoLeftParen(Scanner &in, VarNames &names)
void readIdealNoLeftParen(Scanner &in, InputConsumer &consumer)
void writeTermProduct(const Term &term, const TermTranslator &translator, FILE *out)