9#ifndef IMPKERNEL_HASH_H
10#define IMPKERNEL_HASH_H
12#include <IMP/kernel_config.h>
15IMP_CLANG_PRAGMA(diagnostic push)
16IMP_CLANG_PRAGMA(diagnostic ignored
"-Wmismatched-tags")
18#include <boost/functional/hash.hpp>
19#include <boost/functional/hash/hash.hpp>
21IMP_CLANG_PRAGMA(diagnostic pop)
30#include <boost/graph/adjacency_list.hpp>
35IMPKERNEL_BEGIN_NAMESPACE
37inline std::size_t hash_value(
const T &t) {
40inline std::size_t hash_value(
double d) {
return boost::hash_value(d); }
41inline std::size_t hash_value(
int d) {
return boost::hash_value(d); }
42inline std::size_t hash_value(
bool d) {
return boost::hash_value(d); }
43inline std::size_t hash_value(
const std::string &d) {
44 return boost::hash_value(d);
49inline std::size_t hash_value(
const std::vector<T> &t) {
50 return boost::hash_range(t.begin(), t.end());
54inline std::size_t hash_value(
const std::set<T> &t) {
55 return boost::hash_range(t.begin(), t.end());
57IMPKERNEL_END_NAMESPACE