size_t hash_dfa(const raw_dfa &rdfa) { using boost::hash_combine; size_t v = 0; hash_combine(v, hash_dfa_no_reports(rdfa)); hash_combine(v, all_reports(rdfa)); return v; }
std::size_t operator()(const Edge<Z>& edge) const { using boost::hash_value; using boost::hash_combine; static std::hash<Z> observationHasher; std::size_t seed = 0; hash_combine(seed,hash_value(edge.actionIndex)); hash_combine(seed,observationHasher(edge.observation)); return seed; }
std::size_t hash_value(Point<float> const& p) { using std::size_t; using boost::hash_combine; size_t seed = 0; hash_combine(seed, p.x); hash_combine(seed, p.y); return seed; }
size_t hash_dfa_no_reports(const raw_dfa &rdfa) { using boost::hash_combine; using boost::hash_range; size_t v = 0; hash_combine(v, rdfa.alpha_size); hash_combine(v, hash_range(begin(rdfa.alpha_remap), end(rdfa.alpha_remap))); for (const auto &ds : rdfa.states) { hash_combine(v, hash_range(begin(ds.next), end(ds.next))); } return v; }
std::size_t operator()(const SurfaceVertex& v) const { using boost::hash_value; using boost::hash_combine; // Start with a hash value of 0 . std::size_t seed = 0; // Modify 'seed' by XORing and bit-shifting in // one member of 'Key' after the other: hash_combine(seed,hash_value(v.position[0])); hash_combine(seed,hash_value(v.position[1])); hash_combine(seed,hash_value(v.position[2])); // Return the result. return seed; }
size_t hash_value(const locator::value& val) { using boost::hash_value; using boost::hash_combine; size_t hash = hash_value(val.type_); if (val.type_ == locator::FILE || val.type_ == locator::SUB_FILE) { hash_combine(hash, val.filename_); } if (val.type_ == locator::SUB_FILE) { hash_combine(hash, val.loc_.x); hash_combine(hash, val.loc_.y); hash_combine(hash, val.center_x_); hash_combine(hash, val.center_y_); hash_combine(hash, val.modifications_); } return hash; }
std::size_t operator()(const argument_type& pair) const { std::size_t seed = 0; hash_combine(seed, pair.first); hash_combine(seed, pair.second); return seed; }