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);
27 seed ^= h + 0x9e3779b9 + (seed<<6) + (seed>>2);
41 template <
typename ValueSet>
46 using value_t =
typename valueset_t::value_t;
50 return valueset_t::hash(v);
67 -> decltype(std::hash<T>{}(
v))
77 template <
typename ValueSet,
typename Value =
typename ValueSet::value_t>
85 return valueset_t::less(lhs, rhs);
90 template <
typename ValueSet,
typename Value =
typename ValueSet::value_t>
98 return valueset_t::less(lhs, rhs) || valueset_t::equal(lhs, rhs);
105 template <
typename Value,
size_t Size>
106 struct hash<
std::array<Value, Size>>
114 size_t res = h(v[0]);
115 for (
size_t i = 1; i < Size; i++)
121 #if defined __clang__ and __clang_major__ == 3 and __clang_minor__ < 7
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.
bool operator()(const value_t &v1, const value_t &v2) const
bool operator()(const value_t &lhs, const value_t &rhs) const
typename valueset_t::value_t value_t
size_t operator()(const value_t &v) const
void hash_combine(std::size_t &seed, const T &v)
Functor to compare Values of ValueSets.
size_t operator()(const value_t &v) const
std::array< Value, Size > value_t
This is useful to make hashes with labels or weights as keys without using non-default constructors; ...
typename valueset_t::value_t value_t
This is useful to make hashes with labels or weights as keys without using non-default constructors; ...
void hash_combine_hash(std::size_t &seed, size_t h)
Functor to compare Values of ValueSets.