blob: de244730656811be483895210f8d90d1611fcc57 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
#include <functional>
#include <vector>
struct IntVectorHash {
size_t operator()(const std::vector<int>& v) const {
std::hash<int> hasher;
size_t seed = 0;
for (int i : v) {
seed ^= hasher(i) + 0x9e3779b9 + (seed << 6) + (seed >> 2);
}
return seed;
}
};
|