37 #ifndef OMPL_UTIL_HASH_
38 #define OMPL_UTIL_HASH_
41 #include <type_traits>
44 #include <boost/functional/hash.hpp>
50 inline void hash_combine(std::size_t &seed,
const T &v)
53 seed ^= hasher(v) + 0x9e3779b9 + (seed << 6) + (seed >> 2);
59 template <
class U,
class V>
60 struct hash<std::pair<U, V>>
62 using argument_type = std::pair<U, V>;
63 using result_type = std::size_t;
64 result_type operator()(argument_type
const &p)
const
66 result_type h = std::hash<std::remove_cv_t<U>>()(p.first);
67 ompl::hash_combine(h, p.second);
73 struct hash<std::vector<T>>
75 using argument_type = std::vector<T>;
76 using result_type = std::size_t;
77 result_type operator()(argument_type
const &v)
const
80 boost::hash_range(h, v.begin(), v.end());