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()));
static const size_t invalidIndex
Returns a fixed variable offset that is always invalid.
auto_ptr< SquareFreeIdeal > _sqf
void readIntegerNoSign(string &str)
Read an arbitrary-precision integer.
void exceptionSafePushBack(Container &container, auto_ptr< Element > pointer)
Defines the variables of a polynomial ring and facilities IO involving them.
size_t getIndex(const string &name) const
Returns VarNames::invalidIndex() if name is not known.
void setExponent(Word *a, size_t var, bool value)
void swap(VarNames &names)
This class offers an input interface which is more convenient and for some purposes more efficient th...
unsigned long Word
The native unsigned type for the CPU.
bool getExponent(const Word *a, size_t var)
returns true if var divides a and false otherwise.
void readSizeT(size_t &size)
Reads a size_t, where the representable range of that type determines when the number is too big...
const char * readIdentifier()
The returned string is only valid until the next method on this object gets called.
void reportSyntaxError(const Scanner &scanner, const string &errorMsg)
void reportError(const string &errorMsg)
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.
A replacement for stringstream.
bool match(char c)
Return true if the next character is c, and in that case skip past it.
auto_ptr< BigIdeal > _big