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

◆ findOrInsert()

std::pair< const int *, bool > MonomialSetVarSize::findOrInsert ( const int * monom)
inline

monom should be the begin of an allocated and set range of ints [m, m + mMonomialSize). returned value is either 'monom' (if not present in the set), or the corresponding pointer in the set, whose contents are the same as those of monom.

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

253 {
254 auto result = mHash.insert(monom);
255 return std::make_pair(* result.first, result.second);
256 }
std::unordered_set< const int *, MonomialHashAndEqVarSize, MonomialHashAndEqVarSize > mHash
VALGRIND_MAKE_MEM_DEFINED & result(result)

References mHash, and result().