Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
Aleph::Aleph_Hash< T > Struct Template Reference

Primary hash functor used internally by dft_hash_fct / snd_hash_fct. More...

#include <hash-fct.H>

Public Member Functions

size_t operator() (const T &key) const noexcept
 
size_t operator() (const T &key, std::uint32_t seed) const noexcept
 

Detailed Description

template<typename T>
struct Aleph::Aleph_Hash< T >

Primary hash functor used internally by dft_hash_fct / snd_hash_fct.

Resolution order (in priority):

  1. ADL — calls aleph_hash_value(key) if found in T's namespace. This is the semantic path for user-defined types.
  2. Byte — calls wyhash_hash for trivially-copyable, non-pointer T. This is the default path for scalars and POD structs.
  3. Errorstatic_assert for any other T, with an actionable message.

Users may also fully specialize Aleph_Hash<MyType> as an alternative to ADL.

Template Parameters
TKey type.

Definition at line 889 of file hash-fct.H.

Member Function Documentation

◆ operator()() [1/2]

template<typename T >
size_t Aleph::Aleph_Hash< T >::operator() ( const T key) const
inlinenoexcept

Definition at line 907 of file hash-fct.H.

References Aleph::aleph_hash_value(), and Aleph::wyhash_hash().

◆ operator()() [2/2]

template<typename T >
size_t Aleph::Aleph_Hash< T >::operator() ( const T key,
std::uint32_t  seed 
) const
inlinenoexcept

Definition at line 915 of file hash-fct.H.

References Aleph::aleph_hash_value(), h, Aleph::hash_combine(), seed, and Aleph::wyhash_hash().


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