66 for (
size_t var = 0; var <
_term.size(); ++var) {
82 if (var == 0 || var >
_names.getVarCount()) {
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 unique_ptr<Entry> entry(
new Entry());
205 sqf = std::move(entry.
_sqf);
206 big = std::move(entry.
_big);
215 return std::move(entry.
_big);
224 return std::move(entry.
_sqf);
230 entry = std::move(*
_ideals.front());
236 errorMsg <<
"The variable " <<
_names.getName(var)
237 <<
" appears twice in the same monomial.";
251 big.reset(
new BigIdeal(sqf->getNames()));
void exceptionSafePushBack(Container &container, unique_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.
static const size_t invalidIndex
Returns a fixed variable offset that is always invalid.
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.
This header file includes common definitions and is included as the first line of code in every imple...
unsigned long Word
The native unsigned type for the CPU.
unique_ptr< SquareFreeIdeal > _sqf
unique_ptr< BigIdeal > _big