|
Macaulay2 Engine
|
Hash functor on Monom (or Word) suitable for std::unordered_map / std::unordered_set. More...
#include <FreeMonoid.hpp>
Public Member Functions | |
| int | operator() (const Monom &V) const |
| int | operator() (const Word &V) const |
Hash functor on Monom (or Word) suitable for std::unordered_map / std::unordered_set.
Seeds the hash with the first int (length / first word position), then folds each remaining int in with the boost-style mix hash ^= i + 0x9e3779b9 + (hash << 6) + (hash >> 2). Same algorithm for both Monom and Word overloads.
Definition at line 275 of file FreeMonoid.hpp.