Hyperiso
1.0.3
Modular flavour-physics calculations, Wilson coefficients and statistical inference
Loading...
Searching...
No Matches
hash_utils.hpp
Go to the documentation of this file.
1
#ifndef HASH_UTILS_H
2
#define HASH_UTILS_H
3
4
#include <utility>
5
#include <cstddef>
6
34
struct
PairHash
{
45
std::size_t
operator()
(
const
std::pair<int,int>& p)
const
noexcept
{
46
std::size_t h =
static_cast<
std::size_t
>
(p.first);
47
h ^= (
static_cast<
std::size_t
>
(p.second) + 0x9e3779b97f4a7c15ULL + (h<<6) + (h>>2));
48
return
h;
49
}
50
};
51
52
#endif
PairHash
Hash functor for std::pair<int,int>.
Definition
hash_utils.hpp:34
PairHash::operator()
std::size_t operator()(const std::pair< int, int > &p) const noexcept
Computes a hash value for a pair of integers.
Definition
hash_utils.hpp:45
Hyperiso
core
src
Common
hash_utils.hpp
Generated by
1.9.8