MADNESS 0.10.1
Public Member Functions | List of all members
madness::Hash< T > Struct Template Reference

Hash functor. More...

#include <worldhash.h>

Public Member Functions

hashT operator() (const T &t) const
 Hashing function wrapper.
 

Detailed Description

template<typename T>
struct madness::Hash< T >

Hash functor.

This hash functor calls hash_value for the given type, T . The namespace for hash_value function is not specified so you are free to implement your own version for your data type as follows:

namespace MyNamespace {
class MyClass;
madness::hashT hash_value(const MyClass& t) {
// ...
}
} // namespace MyNamespace
std::size_t hashT
The hash value type.
Definition worldhash.h:145
hashT hash_value(const Key &key)
Definition test_hashdc.cc:67

or you can specialize this functor directly.

Template Parameters
TThe object type to hash

Member Function Documentation

◆ operator()()

template<typename T >
hashT madness::Hash< T >::operator() ( const T t) const
inline

Hashing function wrapper.

Parameters
tThe object to be hashed
Returns
The hashed value

References madness::hash_value().


The documentation for this struct was generated from the following file: