ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
detray::default_hash< value_t > Struct Template Reference

Default hash function makes use of default node in the hash tree. More...

#include <detray/test/utils/hash_tree.hpp>

Inheritance diagram for detray::default_hash< value_t >:
[legend]

Public Types

using data_hasher = std::hash<value_t>
 Hash function used for input data values.
using hash_type = std::size_t
 Type returned by the hash function.
using node_hasher = std::hash<hash_type>
 Hash function used for child hashes.

Public Member Functions

auto operator() (const hash_type &left, const hash_type &right)
 Combine two child hashes.
auto operator() (const value_t &v)
 Hash an input value.

Detailed Description

template<typename value_t>
struct detray::default_hash< value_t >

Default hash function makes use of default node in the hash tree.

Member Function Documentation

◆ operator()() [1/2]

template<typename value_t>
auto detray::default_hash< value_t >::operator() ( const hash_type & left,
const hash_type & right )

Combine two child hashes.

Parameters
leftHash of the left child.
rightHash of the right child.
Returns
Combined hash of the child hashes.

◆ operator()() [2/2]

template<typename value_t>
auto detray::default_hash< value_t >::operator() ( const value_t & v)

Hash an input value.

Parameters
vInput value to hash.
Returns
Hash of the input value.