Go to the documentation of this file.
43 beginAction(
"Validating monomial ideal format name.");
48 }
catch (
const UnknownNameException&) {
61 ASSERT(handler.get() != 0);
63 handler->readSatBinomIdeal(in, consumer);
72 ASSERT(handler.get() != 0);
76 handler->readSatBinomIdeal(in, recorder);
85 ASSERT(handler.get() != 0);
88 handler->readIdeal(in, middleman);
102 ASSERT(handler.get() != 0);
105 handler->readIdeal(in, recorder);
120 ASSERT(handler.get() != 0);
124 handler->readIdeal(in, consumer);
133 vector<BigIdeal*>& ideals,
145 handler->readIdeals(in, recorder);
148 while (!recorder.
empty())
179 consumer->beginConsumingList();
180 consumer->consumeRing(names);
182 for (vector<BigIdeal*>::const_iterator it = ideals.begin();
183 it != ideals.end(); ++it)
184 consumer->consume(**it);
186 consumer->doneConsumingList();
197 ASSERT(handler.get() != 0);
200 handler->readPolynomial(in, recorder);
231 beginAction(
"Reading Alexander dual input.");
234 ASSERT(handler.get() != 0);
237 handler->readIdeal(in, recorder);
244 bool pointSpecified =
false;
245 if (handler->hasMoreInput(in)) {
246 handler->readTerm(in, ideal.
getNames(), term);
247 pointSpecified =
true;
252 return pointSpecified;
256 (
Scanner& in, vector<mpz_class>& v,
size_t integerCount) {
257 beginAction(
"Reading vector.");
259 v.resize(integerCount);
260 for (
size_t i = 0; i < integerCount; ++i)
277 beginAction(
"Reading frobenius instance with Grobner basis.");
283 if (instance.empty())
285 (in,
"The Grobner basis is not followed by a Frobenius instance.");
290 errorMsg <<
"The Grobner basis has "
292 <<
" entries, and the Frobenius instance should then also have "
294 <<
" entries, but in fact it has "
308 for (
size_t i = 0; i < instance.size(); ++i) {
311 gmp_fprintf(out,
"%Zd", instance[i].get_mpz_t());
321 bool valid = (format ==
"4ti2" || format ==
"fplll");
347 if (format ==
"4ti2")
349 else if (format ==
"fplll")
void readFrobeniusInstanceWithGrobnerBasis(Scanner &in, BigIdeal &ideal, vector< mpz_class > &instance)
void writeIdeal(const BigIdeal &ideal, IOHandler *handler, FILE *out)
void writePolynomial(const BigPolynomial &polynomial, IOHandler *handler, FILE *out)
SatBinomRecorder records all consumed saturated binomials into a passed-in ideal.
void readLatticeBasis(Scanner &scanner, BigIdeal &basis)
void readLattice(Scanner &in, BigIdeal &ideal)
void readInteger(mpz_class &integer)
Read an arbitrary-precision integer.
void writeLatticeBasis(FILE *out, const BigIdeal &basis)
This class offers an input interface which is more convenient and for some purposes more efficient th...
auto_ptr< IOHandler > createIOHandler() const
void readIdeals(Scanner &in, vector< BigIdeal * > &ideals, VarNames &names)
Insert the ideals that are read into the parameter ideals.
void writeLatticeBasis(FILE *out, const BigIdeal &basis)
bool isValidLatticeFormat(const string &format)
void writeLattice(FILE *out, const BigIdeal &ideal, const string &format)
void readGrobnerBasis(Scanner &scanner, BigIdeal &basis)
const VarNames & getNames() const
void writeTerm(const vector< mpz_class > &term, const VarNames &names, IOHandler *handler, FILE *out)
void writeIdeals(const vector< BigIdeal * > &ideals, const VarNames &names, IOHandler *handler, FILE *out)
auto_ptr< BigTermConsumer > createIdealWriter(FILE *out)
virtual void consume(const vector< mpz_class > &term)=0
void readPolynomial(Scanner &in, BigPolynomial &polynomial)
void swap(SquareFreeIdeal &ideal)
bool readAlexanderDualInstance(Scanner &in, BigIdeal &ideal, vector< mpz_class > &term)
Represents a saturated binomial ideal.
void readVector(Scanner &in, vector< mpz_class > &v, size_t integerCount)
void reportSyntaxError(const Scanner &scanner, const string &errorMsg)
void readFrobeniusInstance(Scanner &in, vector< mpz_class > &instance)
void readSatBinomIdeal(Scanner &in, SatBinomConsumer &consumer)
Read a saturated binomial ideal from in and feed it to consumer.
void writeFrobeniusInstance(FILE *out, vector< mpz_class > &instance)
void endAction()
Prints to standard error the time since the last call to beginAction.
void exceptionSafePushBack(Container &container, auto_ptr< Element > pointer)
auto_ptr< IOHandler > createIOHandler(const string &prefix)
Returns an IOHandler for the format whose name has the given prefix.
void readFrobeniusInstance(Scanner &in, vector< mpz_class > &numbers)
IOFacade(bool printActions)
An IOHandler implements input and output for some format in such a way that client code does not need...
auto_ptr< CoefBigTermConsumer > createPolynomialWriter(FILE *out)
void readIdeal(Scanner &in, BigTermConsumer &consumer)
Read an ideal from in and feed it to consumer.
A replacement for stringstream.
void writeTerm(const vector< mpz_class > &term, const VarNames &names, FILE *out)
void beginAction(const char *message)
Prints message to standard error if printing is turned on, and records the time when the action start...
Defines the variables of a polynomial ring and facilities IO involving them.
void readSquareFreeIdeal(Scanner &in, SquareFreeIdeal &ideal)
Read a square free ideal from in and place it in the parameter ideal.
void readLatticeBasis(Scanner &scanner, BigIdeal &basis)
size_t getVarCount() const
bool isValidMonomialIdealFormat(const string &format)
void swap(BigIdeal &ideal)
const string & getFormat() const
This is the super class of all facades.