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

◆ findOrInsert()

std::pair< const int *, bool > MonomialSetFixedSize::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 204 of file monomial-sets.hpp.

205 {
206 auto result = mHash.insert(monom);
207 return std::make_pair(* result.first, result.second);
208 }
std::unordered_set< const int *, MonomialHashAndEqFixedSize, MonomialHashAndEqFixedSize > mHash
VALGRIND_MAKE_MEM_DEFINED & result(result)

References mHash, and result().