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

◆ hashValue()

auto newf4::MonomialHashFunction::hashValue ( const MonomialView & w) ->HashInt
inline

Definition at line 88 of file MonomialHashTable.hpp.

89 {
90 HashInt val = 0;
91 for (auto i = w.begin(); i != w.end(); ++i)
92 // TODO: check that the variables are in range in mHashValues.
93 // if not, increase the size by adding in new HashInt's (uint64_t).
94 // val += mHashValues[(*i)%64] * (*(i+1));
95 val += mHashValues[i.var() % 64] * i.power();
96 return val;
97 }
std::vector< HashInt > mHashValues
uint64_t HashInt

References mHashValues.