17 #ifndef AWALI_MISC_HASH_HH
18 # define AWALI_MISC_HASH_HH
20 # include <functional>
30 seed ^= hasher(v) + 0x9e3779b9 + (seed<<6) + (seed>>2);
35 namespace awali {
namespace utils {
40 template <
typename ValueSet>
41 class equal_to :
public std::equal_to<typename ValueSet::value_t>
45 using value_t =
typename valueset_t::value_t;
56 template <
typename ValueSet>
61 using value_t =
typename valueset_t::value_t;
65 return valueset_t::hash(v);
83 template<
typename F,
typename S>
This is useful to make hashes with labels or weights as keys without using non-default constructors; ...
Definition: hash.hh:42
typename valueset_t::value_t value_t
Definition: hash.hh:45
bool operator()(const value_t &v1, const value_t &v2) const
Definition: hash.hh:47
ValueSet valueset_t
Definition: hash.hh:44
This is useful to make hashes with labels or weights as keys without using non-default constructors; ...
Definition: hash.hh:58
ValueSet valueset_t
Definition: hash.hh:60
std::size_t operator()(const value_t &v) const
Definition: hash.hh:63
std::size_t result_type
Definition: hash.hh:70
typename valueset_t::value_t value_t
Definition: hash.hh:61
value_t argument_type
Definition: hash.hh:71
RatExpSet::ratexp_t equals(const RatExpSet &rs, const typename RatExpSet::ratexp_t &v)
Definition: equal_visit.hh:153
std::size_t hash_value(const T &v)
Definition: hash.hh:76
Main namespace of Awali.
Definition: ato.hh:22
void hash_combine(std::size_t &seed, const T &v)
Definition: hash.hh:27