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

Interning collection that pairs a MonomialSetFixedSize with its own MonomialMemorySpace to own monomial storage. More...

#include <monomial-sets.hpp>

Public Member Functions

 MonomialCollectionFixedSize (int monomialSize)
MonomialMemorySpacemonomialMemorySpace ()
int elementSize () const
std::size_t size () const
std::pair< const int *, boolfindOrInsert (const int *monom)
std::pair< const int *, boolfindOrInsertTopInternedMonomial (int *&monom)
const intfind (const int *monom) const

Private Attributes

MonomialSetFixedSize mSet
MonomialMemorySpace mMonomialMemory

Detailed Description

Interning collection that pairs a MonomialSetFixedSize with its own MonomialMemorySpace to own monomial storage.

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

findOrInsert(monom) copies the caller's monomial into the arena, tries to insert the new pointer into the set, and pops the allocation back off the arena if a duplicate was already present (the "intern-or-pop" pattern). monomialMemorySpace() exposes the arena so callers that allocate first and then insert can do so without an extra copy.

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


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