49 fputs(first ?
"\n " :
",\n ",
getFile());
55 fputs(first ?
"\n " :
",\n ",
getFile());
70 "Older format used by the program Monos.") {
101 }
while (in.
match(
','));
114 if (!in.
match(
']')) {
117 }
while (in.
match(
','));
118 if (!in.
match(
']')) {
132 const char* pre =
"";
133 for (
unsigned int i = 0; i < names.
getVarCount(); ++i) {
135 fputs(names.
getName(i).c_str(), out);
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 further functionality that makes it more convenient to derive from than IOHandler...
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 BigTermConsumer * doCreateIdealWriter(FILE *out)
virtual void doReadRing(Scanner &in, VarNames &names)
virtual void doWriteTerm(const vector< mpz_class > &term, const VarNames &names, FILE *out)
virtual void doReadBareIdeal(Scanner &in, InputConsumer &consumer)
static const char * staticGetName()
virtual void doReadTerm(Scanner &in, InputConsumer &consumer)
virtual bool doPeekRing(Scanner &in)
virtual void doWriteHeader(bool first)
virtual void doWriteTerm(const Term &term, const TermTranslator &translator, bool first)
virtual void doWriteTerm(const vector< mpz_class > &term, bool first)
virtual void doWriteEmptyList()
MonosIdealWriter(FILE *out)
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 peekIdentifier()
Skips whitespace and returns true if the next token is an identifier.
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 clear()
Resets the number of variables to zero.
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 writeTermProduct(const Term &term, const TermTranslator &translator, FILE *out)