Go to the documentation of this file.
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);
virtual void doReadBareIdeal(Scanner &in, InputConsumer &consumer)
void writeTermProduct(const Term &term, const TermTranslator &translator, FILE *out)
static const DataType & getMonomialIdealListType()
Returns the one and only instance for monomial ideal lists.
static const char * staticGetName()
virtual void doWriteHeader(bool first)
This class offers an input interface which is more convenient and for some purposes more efficient th...
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.
const VarNames & getNames()
virtual void doWriteEmptyList()
bool match(char c)
Return true if the next character is c, and in that case skip past it.
virtual bool doPeekRing(Scanner &in)
virtual void doWriteTerm(const vector< mpz_class > &term, bool first)
const char * readIdentifier()
The returned string is only valid until the next method on this object gets called.
const string & getName(size_t index) const
The returned reference can become invalid next time addVar is called.
TermTranslator handles translation between terms whose exponents are infinite precision integers and ...
void addVarSyntaxCheckUnique(const Scanner &in, const string &name)
As addvar, except it reports a syntax error if name is already a variable.
size_t getVarCount() const
Returns the current number of variables.
virtual BigTermConsumer * doCreateIdealWriter(FILE *out)
virtual void doReadTerm(Scanner &in, InputConsumer &consumer)
void writeRing(const VarNames &names, FILE *out)
virtual void doWriteTerm(const vector< mpz_class > &term, const VarNames &names, FILE *out)
Term represents a product of variables which does not include a coefficient.
virtual void doWriteTerm(const Term &term, const TermTranslator &translator, bool first)
void expect(char expected)
Require the next character to be equal to expected.
void clear()
Resets the number of variables to zero.
virtual void doWriteFooter(bool wasZeroIdeal)
void registerOutput(const DataType &type)
Specify that output of the argument type is supported.
static const DataType & getMonomialIdealType()
Returns the one and only instance for monomial ideals.
MonosIdealWriter(FILE *out)
virtual void doReadRing(Scanner &in, VarNames &names)
bool peekIdentifier()
Skips whitespace and returns true if the next token is an identifier.
Defines the variables of a polynomial ring and facilities IO involving them.
bool peek(char character)
Skips whitespace and returns true if the next character is equal to the parameter(s).