|
Macaulay2 Engine
|
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) | |
| MonomialMemorySpace & | monomialMemorySpace () |
| int | elementSize () const |
| std::size_t | size () const |
| std::pair< const int *, bool > | findOrInsert (const int *monom) |
| std::pair< const int *, bool > | findOrInsertTopInternedMonomial (int *&monom) |
| const int * | find (const int *monom) const |
Private Attributes | |
| MonomialSetFixedSize | mSet |
| MonomialMemorySpace | mMonomialMemory |
Interning collection that pairs a MonomialSetFixedSize with its own MonomialMemorySpace to own monomial storage.
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.