|
Macaulay2 Engine
|
Monom extended with a module component, a stored index, and a memoised hash — the value type of IntsSet and friends. More...
#include <Polynomial.hpp>
Public Member Functions | |
| ModuleMonom (int *begin) | |
| const int * | operator+ (int i) const |
| int | operator[] (int i) const |
| int * | operator+ (int i) |
| int & | operator[] (int i) |
| int | size () const |
| const int * | begin () const |
| const int * | end () const |
| int * | begin () |
| int * | end () |
| int | component () const |
| void | setIndex (int idx) |
| int | index () const |
| std::size_t | hash () const |
| bool | operator== (const ModuleMonom &rhs) const |
Static Public Member Functions | |
| static int | sizeOfCorrespondingModuleMonom (const Monom &m) |
| static int | compare (const ModuleMonom &m1, const ModuleMonom &m2) |
Private Member Functions | |
| void | setHashValue () const |
Private Attributes | |
| int * | mValue |
Monom extended with a module component, a stored index, and a memoised hash — the value type of IntsSet and friends.
Layout: [len, value/index, hashval, Computations, deg, v1, ..., vr]. The trailing slice [len-3, deg, v1, ..., vr] is exactly a Monom. value/index (mValue[1]) is the slot the owning IntsSet writes its enumeration index into; hashval (mValue[2]) is lazily computed on the first hash() call so subsequent lookups skip the work. compare() orders by hash, then component, then descending lex (so m1 > m2 returns LT — intentional to keep insertion-order monomials in the conventional "lead term first" position).
Definition at line 107 of file Polynomial.hpp.