delpi  0.0.1
DElta-complete LP solver
Loading...
Searching...
No Matches
delpi::hash Namespace Reference

Namespace containing all the hash functions and utilities. More...

Classes

struct  hash_value
 Computes the hash value of v using std::hash. More...
struct  hash_value< std::pair< T1, T2 > >
 Computes the hash value of a pair p. More...
struct  hash_value< std::vector< T > >
 Computes the hash value of a vector vec. More...
struct  hash_value< std::set< T > >
 Computes the hash value of a set s. More...
struct  hash_value< std::map< T1, T2 > >
 Computes the hash value of a map. More...

Functions

template<class T>
size_t hash_combine (size_t seed, const T &v)
 Combines a given hash value seed and a hash of parameter v.
template<typename It>
size_t hash_range (It first, It last)
 Computes the combined hash value of the elements of an iterator range.

Detailed Description

Namespace containing all the hash functions and utilities.

Author
Ernesto Casablanca (casab.nosp@m.lanc.nosp@m.aerne.nosp@m.sto@.nosp@m.gmail.nosp@m..com)

Function Documentation

◆ hash_combine()

template<class T>
size_t delpi::hash::hash_combine ( size_t seed,
const T & v )
inline

Combines a given hash value seed and a hash of parameter v.

Combines two hash values into one.

The following code is public domain according to http://www.burtleburtle.net/bob/hash/doobs.html.

Definition at line 71 of file hash.hpp.