Clingo
Loading...
Searching...
No Matches
Hash Functions

Generic functions for equality comparison and hash computation. More...

Classes

struct  CppClingo::Util::value_hasher
 Compute a hash using std::hash. More...
 
struct  CppClingo::Util::value_equal_to
 Helper class to compare pointers and some STL containers holding pointers by value. More...
 
class  CppClingo::Util::array_hash
 Hasher for arrays of dynamic but fixed size. More...
 
struct  CppClingo::Util::array_equal_to
 Comparison operator for arrays of dynamic but fixed size. More...
 

Functions

auto CppClingo::Util::hash_mix (size_t h) -> size_t
 Perturb the given seed.
 
template<class... T>
auto CppClingo::Util::hash_combine (T... a) -> size_t
 Combine the given hashes.
 
auto CppClingo::Util::value_hash (std::type_info const &x) -> size_t
 Compute a hash for type_info.
 
template<class T >
auto CppClingo::Util::value_hash (T const &x) -> size_t
 Compute a hash using std::hash.
 
template<class T >
auto CppClingo::Util::value_hash (T *x) -> size_t
 Compute hash for pointers.
 
template<class T >
auto CppClingo::Util::value_hash (std::optional< T > const &x) -> size_t
 Compute hash for optionals.
 
template<class T >
auto CppClingo::Util::value_hash (std::reference_wrapper< T > const &x) -> size_t
 Compute hash for reference_wrapper.
 
template<class T , class D >
auto CppClingo::Util::value_hash (std::unique_ptr< T, D > const &x) -> size_t
 Compute hash for unique_ptr.
 
template<class T >
auto CppClingo::Util::value_hash (immutable_value< T > const &x) -> size_t
 Compute hash for immutable_value.
 
template<class T , class U >
auto CppClingo::Util::value_hash (std::pair< T, U > const &x) -> size_t
 Compute the hash of a pair.
 
template<class... T>
auto CppClingo::Util::value_hash (std::tuple< T... > const &x) -> size_t
 Compute the hash of a tuple.
 
template<class... T>
auto CppClingo::Util::value_hash (std::variant< T... > const &x) -> size_t
 Compute the hash of a variant.
 
template<class T , size_t E>
auto CppClingo::Util::value_hash (std::span< T, E > const &x) -> size_t
 Compute the hash of a span.
 
template<class T , class A >
auto CppClingo::Util::value_hash (std::vector< T, A > const &x) -> size_t
 Compute the hash of a vector.
 
template<class T >
auto CppClingo::Util::value_hash (Util::immutable_array< T > const &x) -> size_t
 Compute the hash of an immutable array.
 
template<class T , size_t N>
auto CppClingo::Util::value_hash (Util::small_vector< T, N > const &x) -> size_t
 Compute the hash of an immutable array.
 
auto CppClingo::Util::value_hash (char const *x) -> size_t
 Compute the hash of a string.
 
auto CppClingo::Util::value_hash (std::string_view const &x) -> size_t
 Compute the hash of a string.
 
auto CppClingo::Util::value_hash (std::string const &x) -> size_t
 Compute the hash of a string.
 
template<class T >
auto CppClingo::Util::value_hash_range (T const &x) -> size_t
 Compute the hash for a given range of elements.
 
template<class T , class... Args>
auto CppClingo::Util::value_hash_record (Args const &...x) -> size_t
 Compute and combine the hashes of the given arguments.
 

Detailed Description

Generic functions for equality comparison and hash computation.