38 #include <unordered_map>
39 #include <unordered_set>
48 typedef unsigned long long u64_t;
50 typedef unsigned char u8_t;
66 template <
class T>
struct Hash;
68 template <
class S,
class T>
struct Hash<std::pair<S, T>>
78 Hash<decltype(t.first)> first;
79 Hash<decltype(t.second)> second;
80 return szudzik(first(t.first), second(t.second));
84 template <
class T>
struct Hash
93 template <
typename Key,
typename Hash = Hash<Key>,
94 typename KeyEqual = std::equal_to<Key>,
95 typename Allocator = std::allocator<Key>>
96 using Set = std::unordered_set<Key, Hash, KeyEqual, Allocator>;
98 template <
typename Key,
typename Value,
typename Hash = Hash<Key>,
99 typename KeyEqual = std::equal_to<Key>,
100 typename Allocator = std::allocator<std::pair<const Key, Value>>>
101 using Map = std::unordered_map<Key, Value, Hash, KeyEqual, Allocator>;
103 template <
typename Key,
typename Compare = std::less<Key>,
104 typename Allocator = std::allocator<Key>>
107 template <
typename Key,
typename Value,
typename Compare = std::less<Key>,
108 typename Allocator = std::allocator<std::pair<const Key, Value>>>
Set< Version > VersionSet
std::stack< NodeID > NodeStack
std::pair< NodeID, Version > VersionedVar
std::deque< NodeID > NodeDeque
std::vector< NodeID > NodeVector
OrderedSet< NodeID > OrderedNodeSet
std::vector< EdgeID > EdgeVector
std::set< Key, Compare, Allocator > OrderedSet
Set< VersionedVar > VersionedVarSet
Map< NodePair, NodeID > NodePairMap
std::unordered_map< Key, Value, Hash, KeyEqual, Allocator > Map
std::vector< u32_t > CallStrCxt
std::list< NodeID > NodeList
Set< NodePair > NodePairSet
std::map< Key, Value, Compare, Allocator > OrderedMap
std::pair< NodeID, NodeID > NodePair
std::unordered_set< Key, Hash, KeyEqual, Allocator > Set
size_t operator()(const std::pair< S, T > &t) const
static size_t szudzik(size_t a, size_t b)
provide extra hash function for std::pair handling
size_t operator()(const T &t) const