IOFacade.h
Go to the documentation of this file.
/* Frobby: Software for monomial ideal computations.
Copyright (C) 2007 Bjarke Hammersholt Roune (www.broune.com)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see http://www.gnu.org/licenses/.
*/
#ifndef IO_FACADE_GUARD
#define IO_FACADE_GUARD
#include "Facade.h"
#include <vector>
class BigIdeal;
class Scanner;
class IOHandler;
class BigPolynomial;
class VarNames;
class BigTermConsumer;
class SatBinomIdeal;
class SatBinomConsumer;
class SquareFreeIdeal;
class IOFacade : private Facade {
public:
IOFacade(bool printActions);
bool isValidMonomialIdealFormat(const string& format);
void readSatBinomIdeal(Scanner& in, SatBinomConsumer& consumer);
void readSatBinomIdeal(Scanner& in, SatBinomIdeal& ideal);
void readIdeal(Scanner& in, BigTermConsumer& consumer);
void readIdeal(Scanner& in, BigIdeal& ideal);
void readSquareFreeIdeal(Scanner& in, SquareFreeIdeal& ideal);
void readIdeals(Scanner& in, vector<BigIdeal*>& ideals, VarNames& names);
void writeIdeal(const BigIdeal& ideal, IOHandler* handler, FILE* out);
void writeIdeals(const vector<BigIdeal*>& ideals,
const VarNames& names,
IOHandler* handler,
FILE* out);
void readPolynomial(Scanner& in, BigPolynomial& polynomial);
void writePolynomial(const BigPolynomial& polynomial,
IOHandler* handler,
FILE* out);
void writeTerm(const vector<mpz_class>& term,
const VarNames& names,
IOHandler* handler,
FILE* out);
void readFrobeniusInstance(Scanner& in, vector<mpz_class>& instance);
void readFrobeniusInstanceWithGrobnerBasis
(Scanner& in, BigIdeal& ideal, vector<mpz_class>& instance);
void writeFrobeniusInstance(FILE* out, vector<mpz_class>& instance);
bool readAlexanderDualInstance
(Scanner& in, BigIdeal& ideal, vector<mpz_class>& term);
void readVector(Scanner& in, vector<mpz_class>& v, size_t integerCount);
bool isValidLatticeFormat(const string& format);
void readLattice(Scanner& in, BigIdeal& ideal);
void writeLattice(FILE* out, const BigIdeal& ideal, const string& format);
};
#endif
Facade.h
BigIdeal
Definition BigIdeal.h:27
BigPolynomial
Definition BigPolynomial.h:27
BigTermConsumer
Definition BigTermConsumer.h:29
Facade::Facade
Facade(bool printActions)
Constructs a facade that prints out what it is doing if printActions is true.
Definition Facade.cpp:20
IOFacade::isValidLatticeFormat
bool isValidLatticeFormat(const string &format)
Definition IOFacade.cpp:318
IOFacade::writeFrobeniusInstance
void writeFrobeniusInstance(FILE *out, vector< mpz_class > &instance)
Definition IOFacade.cpp:305
IOFacade::readFrobeniusInstance
void readFrobeniusInstance(Scanner &in, vector< mpz_class > &instance)
Definition IOFacade.cpp:267
IOFacade::writePolynomial
void writePolynomial(const BigPolynomial &polynomial, IOHandler *handler, FILE *out)
Definition IOFacade.cpp:205
IOFacade::isValidMonomialIdealFormat
bool isValidMonomialIdealFormat(const string &format)
Definition IOFacade.cpp:42
IOFacade::readPolynomial
void readPolynomial(Scanner &in, BigPolynomial &polynomial)
Definition IOFacade.cpp:192
IOFacade::readFrobeniusInstanceWithGrobnerBasis
void readFrobeniusInstanceWithGrobnerBasis(Scanner &in, BigIdeal &ideal, vector< mpz_class > &instance)
Definition IOFacade.cpp:276
IOFacade::writeIdeal
void writeIdeal(const BigIdeal &ideal, IOHandler *handler, FILE *out)
Definition IOFacade.cpp:156
IOFacade::writeTerm
void writeTerm(const vector< mpz_class > &term, const VarNames &names, IOHandler *handler, FILE *out)
Definition IOFacade.cpp:218
IOFacade::readIdeals
void readIdeals(Scanner &in, vector< BigIdeal * > &ideals, VarNames &names)
Insert the ideals that are read into the parameter ideals.
Definition IOFacade.cpp:132
IOFacade::readLattice
void readLattice(Scanner &in, BigIdeal &ideal)
Definition IOFacade.cpp:329
IOFacade::readIdeal
void readIdeal(Scanner &in, BigTermConsumer &consumer)
Read an ideal from in and feed it to consumer.
Definition IOFacade.cpp:81
IOFacade::readSquareFreeIdeal
void readSquareFreeIdeal(Scanner &in, SquareFreeIdeal &ideal)
Read a square free ideal from in and place it in the parameter ideal.
Definition IOFacade.cpp:116
IOFacade::readSatBinomIdeal
void readSatBinomIdeal(Scanner &in, SatBinomConsumer &consumer)
Read a saturated binomial ideal from in and feed it to consumer.
Definition IOFacade.cpp:57
IOFacade::writeIdeals
void writeIdeals(const vector< BigIdeal * > &ideals, const VarNames &names, IOHandler *handler, FILE *out)
Definition IOFacade.cpp:168
IOFacade::IOFacade
IOFacade(bool printActions)
Definition IOFacade.cpp:38
IOFacade::writeLattice
void writeLattice(FILE *out, const BigIdeal &ideal, const string &format)
Definition IOFacade.cpp:344
IOFacade::readVector
void readVector(Scanner &in, vector< mpz_class > &v, size_t integerCount)
Definition IOFacade.cpp:256
IOFacade::readAlexanderDualInstance
bool readAlexanderDualInstance(Scanner &in, BigIdeal &ideal, vector< mpz_class > &term)
Definition IOFacade.cpp:230
IOHandler
An IOHandler implements input and output for some format in such a way that client code does not need...
Definition IOHandler.h:41
SatBinomConsumer
Definition SatBinomConsumer.h:25
SatBinomIdeal
Represents a saturated binomial ideal.
Definition SatBinomIdeal.h:28
Scanner
This class offers an input interface which is more convenient and for some purposes more efficient th...
Definition Scanner.h:50
SquareFreeIdeal
Definition SquareFreeIdeal.h:24
VarNames
Defines the variables of a polynomial ring and facilities IO involving them.
Definition VarNames.h:40