Macaulay2 Engine
Loading...
Searching...
No Matches
ModuleMonom Class Reference

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 intoperator+ (int i) const
int operator[] (int i) const
intoperator+ (int i)
intoperator[] (int i)
int size () const
const intbegin () const
const intend () const
intbegin ()
intend ()
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

intmValue

Detailed Description

Monom extended with a module component, a stored index, and a memoised hash — the value type of IntsSet and friends.

Note
AI-generated documentation. Verify against the source before relying on it.

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.


The documentation for this class was generated from the following file: