27 vector<vector<mpz_class> > tmp;
30 while (!scanner.
match(
']')) {
32 tmp.resize(tmp.size() + 1);
33 while (!scanner.
match(
']')) {
36 tmp.back().push_back(integer);
39 if (tmp.front().size() != tmp.back().size()) {
41 errorMsg <<
"Row 1 has " 43 <<
" entries, while row " 52 VarNames names(tmp.empty() ? 0 : tmp.front().size());
55 for (
unsigned int i = 0; i < tmp.size(); ++i) {
57 for (
unsigned int j = 0; j < tmp[i].size(); ++j)
66 const char* prefix =
"";
67 for (
unsigned int j = 0; j < basis[i].size(); ++j) {
68 gmp_fprintf(out,
"%s%Zd", prefix, basis[i][j].get_mpz_t());
void clearAndSetNames(const VarNames &names)
mpz_class & getLastTermExponentRef(size_t var)
Defines the variables of a polynomial ring and facilities IO involving them.
void readInteger(mpz_class &integer)
Read an arbitrary-precision integer.
size_t getGeneratorCount() const
This class offers an input interface which is more convenient and for some purposes more efficient th...
void readLatticeBasis(Scanner &scanner, BigIdeal &basis)
void writeLatticeBasis(FILE *out, const BigIdeal &basis)
void expect(char expected)
Require the next character to be equal to expected.
void reportSyntaxError(const Scanner &scanner, const string &errorMsg)
A replacement for stringstream.
bool match(char c)
Return true if the next character is c, and in that case skip past it.