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

◆ insert()

template<typename ValueType>
void MonomialHashTable< ValueType >::insert ( value m)
private

Definition at line 37 of file monhashtable.cpp.

38{
39 long hashval = HASHVALUE(m) & hashmask;
40 while (hashtab[hashval])
41 {
42 hashval++;
43 nclashes++;
44 if (hashval == size) hashval = 0;
45 }
46 hashtab[hashval] = m;
47 count++;
48 if (count > threshold) grow();
49}
std::unique_ptr< value[]> hashtab
unsigned long size
unsigned long nclashes
unsigned long threshold
unsigned long count
unsigned long hashmask
#define HASHVALUE(m)

References count, grow(), hashmask, hashtab, HASHVALUE, nclashes, size, and threshold.

Referenced by grow().