|
Hyperiso 1.0.3
Modular flavour-physics calculations, Wilson coefficients and statistical inference
|
Hash functor for std::pair<int,int>. More...
#include <hash_utils.hpp>
Public Member Functions | |
| std::size_t | operator() (const std::pair< int, int > &p) const noexcept |
| Computes a hash value for a pair of integers. | |
Hash functor for std::pair<int,int>.
This functor implements a 64-bit hash combine pattern inspired by Boost's hash_combine. The two integer components are mixed into a single std::size_t value, providing a reasonably well-distributed hash for use in hash-based containers.
Typical usage:
Definition at line 34 of file hash_utils.hpp.
|
inlinenoexcept |
Computes a hash value for a pair of integers.
The hash is built from the first component, then combined with the second using a Boost-style mixing step: h ^= (second + constant + (h << 6) + (h >> 2));
| p | Pair of integers to hash. |
Definition at line 45 of file hash_utils.hpp.