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

◆ reInsert()

void MonomialHashTable< ValueType >::reInsert ( MonomialIndex i)
private

Definition at line 18 of file MonomialHashTable.cpp.

19 {
20 auto hashval = mHashValues[i];
21 auto hash = hashval & mHashMask;
22 while (mBuckets[hash] != 0)
23 {
24 hash++;
25 mStats.n_clashes++;
26 if (hash == mBuckets.size()) hash = 0;
27 }
28 mBuckets[hash] = i;
29 }
std::vector< HashInt > mHashValues
std::vector< MonomialIndex > mBuckets

References mBuckets, mHashMask, mHashValues, and mStats.

Referenced by grow().