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

Hash set of interned variable-size monomials — the variable-length counterpart of MonomialSetFixedSize. More...

#include <monomial-sets.hpp>

Public Member Functions

 MonomialSetVarSize ()
std::size_t numElements () const
 number of (unique) monomials in this set.
std::pair< const int *, boolfindOrInsert (const int *monom)
const intfind (const int *monom) const
 returns nullptr if monom is not present, otherwise returns the pointer equivalent to 'monom'.

Private Attributes

MonomialHashAndEqVarSize mMonomialHashAndEq
std::unordered_set< const int *, MonomialHashAndEqVarSize, MonomialHashAndEqVarSizemHash

Detailed Description

Hash set of interned variable-size monomials — the variable-length counterpart of MonomialSetFixedSize.

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

Each monomial is a contiguous range [m, m + *m) where the leading int is the length, so the set itself stores only const int* pointers; the storage is owned by the caller (typically a MonomialMemorySpace). findOrInsert returns the canonical pointer plus a flag indicating whether a new entry was created.

Definition at line 238 of file monomial-sets.hpp.


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