11 template <
typename ValueSet>
12 class equal_to :
public std::equal_to<typename ValueSet::value_t>
16 using value_t =
typename valueset_t::value_t;
20 return valueset_t::equal(v1, v2);
31 -> decltype(std::hash<T>{}(
v))
33 auto hasher = std::hash<T>{};
43 seed ^= h + 0x9e3779b9 + (seed<<6) + (seed>>2);
56 template <
typename ValueSet>
61 using value_t =
typename valueset_t::value_t;
65 return valueset_t::hash(v);
75 template <
typename ValueSet,
typename Value =
typename ValueSet::value_t>
83 return valueset_t::less(lhs, rhs);
88 template <
typename ValueSet,
typename Value =
typename ValueSet::value_t>
96 return valueset_t::less(lhs, rhs) || valueset_t::equal(lhs, rhs);
103 template <
typename Value,
size_t Size>
104 struct hash<
std::array<Value, Size>>
112 size_t res = h(v[0]);
113 for (
size_t i = 1; i < Size; i++)
119 #if defined __clang__ and __clang_major__ == 3 and __clang_minor__ < 7
std::array< Value, Size > value_t
size_t operator()(const value_t &v) const
This is useful to make hashes with labels or weights as keys without using non-default constructors; ...
Functor to compare Values of ValueSets.
This is useful to make hashes with labels or weights as keys without using non-default constructors; ...
size_t operator()(const value_t &v) const
void hash_combine_hash(std::size_t &seed, size_t h)
bool operator()(const value_t &lhs, const value_t &rhs) const
auto hash_value(const T &v) -> decltype(std::hash< T >
Following the naming convention of Boost.
Functor to compare Values of ValueSets.
typename valueset_t::value_t value_t
bool operator()(const value_t &lhs, const value_t &rhs) const
typename valueset_t::value_t value_t
void hash_combine(std::size_t &seed, const T &v)
bool operator()(const value_t &v1, const value_t &v2) const