Macaulay2 Engine
Loading...
Searching...
No Matches

◆ insert()

template<typename Configuration>
bool IntsSet< Configuration >::insert ( Monom m,
int comp )
inline

Definition at line 312 of file monomial-collection.hpp.

313 {
315 std::pair<int*, int*> mon { mArena.allocArrayNoCon<int>(sz) };
317 auto result = mHash.insert(a);
318 bool new_elem = result.second;
319 if (new_elem)
320 {
321 a.setIndex(mElements.size());
322 mElements.push_back(a);
323 }
324 else
325 {
326 mArena.freeTop(a + 0);
327 }
328 return new_elem;
329 }
ModuleMonom monomToModuleMonom(const Monom &a, int comp, std::pair< int *, int * > allocated_result)
memt::Arena mArena
std::vector< ModuleMonom > mElements
static int sizeOfCorrespondingModuleMonom(const Monom &m)

Referenced by NCMonomials().