Drake
hash.h File Reference
#include <cmath>
#include <cstddef>
#include <functional>
#include <iostream>
#include <map>
#include <set>
#include <string>
#include <type_traits>
#include <utility>
#include <vector>
#include "drake/common/drake_assert.h"
#include "drake/common/drake_optional.h"
#include "drake/common/drake_throw.h"
Include dependency graph for hash.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  uhash< HashAlgorithm >
 A hashing functor, somewhat like std::hash. More...
 
class  FNV1aHasher
 The FNV1a hash algorithm, used for hash_append generic hashing. More...
 
struct  DelegatingHasher
 An adapter that forwards the HashAlgorithm::operator(data, length) function concept into a runtime-provided std::function of the same signature. More...
 

Namespaces

 drake
 
 drake::detail
 

Typedefs

using DefaultHasher = detail::FNV1aHasher
 The default HashAlgorithm concept implementation across Drake. More...
 
using DefaultHash = drake::uhash< DefaultHasher >
 The default hashing functor, akin to std::hash. More...
 

Functions

template<class HashAlgorithm , class T >
std::enable_if_t< std::is_integral< T >::valuehash_append (HashAlgorithm &hasher, const T &item) noexcept
 Provides hash_append generic hashing for integral constants. More...
 
template<class HashAlgorithm , class T >
std::enable_if_t< std::is_enum< T >::valuehash_append (HashAlgorithm &hasher, const T &item) noexcept
 Provides hash_append generic hashing for enumerations. More...
 
template<class HashAlgorithm , class T >
std::enable_if_t< std::is_floating_point< T >::valuehash_append (HashAlgorithm &hasher, const T &item) noexcept
 Provides hash_append generic hashing for floating point values. More...
 
template<class HashAlgorithm , class Traits , class Allocator >
void hash_append (HashAlgorithm &hasher, const std::basic_string< char, Traits, Allocator > &item) noexcept
 Provides hash_append generic hashing for std::string. More...
 
template<class HashAlgorithm , class T1 , class T2 >
void hash_append (HashAlgorithm &hasher, const std::pair< T1, T2 > &item) noexcept
 Provides hash_append generic hashing for std::pair. More...
 
template<class HashAlgorithm , class T >
void hash_append (HashAlgorithm &hasher, const drake::optional< T > &item) noexcept
 Provides hash_append generic hashing for drake::optional. More...
 
template<class HashAlgorithm , class Iter >
void hash_append_range (HashAlgorithm &hasher, Iter begin, Iter end) noexcept
 Provides hash_append generic hashing for a range, as given by two iterators. More...
 
template<class HashAlgorithm , class T1 , class T2 , class Compare , class Allocator >
void hash_append (HashAlgorithm &hasher, const std::map< T1, T2, Compare, Allocator > &item) noexcept
 Provides hash_append generic hashing for std::map. More...
 
template<class HashAlgorithm , class Key , class Compare , class Allocator >
void hash_append (HashAlgorithm &hasher, const std::set< Key, Compare, Allocator > &item) noexcept
 Provides hash_append generic hashing for std::set. More...