Macaulay2 Engine
Loading...
Searching...
No Matches
MonomHash Class Reference

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

Detailed Description

Hash functor on Monom (or Word) suitable for std::unordered_map / std::unordered_set.

Note
AI-generated documentation. Verify against the source before relying on it.

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.


The documentation for this class was generated from the following file: