28 _idealsDeleter(_ideals),
30 _requireSquareFree(false) {
66 for (
size_t var = 0; var <
_term.size(); ++var) {
84 errorMsg <<
"There is no variable number " << var <<
'.';
96 errorMsg <<
"Unknown variable \"" <<
_tmpString <<
"\". Maybe you forgot a *.";
113 mpz_class& exponent =
_bigIdeal->getLastTermExponentRef(var);
139 mpz_class& exponent =
_bigIdeal->getLastTermExponentRef(var);
152 if (!in.
match(
'1')) {
159 }
while (in.
match(
'*'));
194 auto_ptr<Entry> entry(
new Entry());
237 <<
" appears twice in the same monomial.";
251 big.reset(
new BigIdeal(sqf->getNames()));
void exceptionSafePushBack(Container &container, auto_ptr< Element > pointer)
A replacement for stringstream.
This class offers an input interface which is more convenient and for some purposes more efficient th...
void readIntegerNoSign(string &str)
Read an arbitrary-precision integer.
const char * readIdentifier()
The returned string is only valid until the next method on this object gets called.
void readSizeT(size_t &size)
Reads a size_t, where the representable range of that type determines when the number is too big.
bool match(char c)
Return true if the next character is c, and in that case skip past it.
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 swap(VarNames &names)
static const size_t invalidIndex
Returns a fixed variable offset that is always invalid.
size_t getIndex(const string &name) const
Returns VarNames::invalidIndex() if name is not known.
void reportSyntaxError(const Scanner &scanner, const string &errorMsg)
void reportError(const string &errorMsg)
void setExponent(Word *a, size_t var, bool value)
bool getExponent(const Word *a, size_t var)
returns true if var divides a and false otherwise.
unsigned long Word
The native unsigned type for the CPU.
auto_ptr< SquareFreeIdeal > _sqf
auto_ptr< BigIdeal > _big