ADS
Algorithms and Data Structures
Loading...
Searching...
No Matches
ADS::FastHash< std::string_view > Struct Reference

the hash of a string, by its bytes; any std::string_view, std::string and C string with the same characters hash the same More...

#include <ADS/dictionary/FastHash.h>

Inheritance diagram for ADS::FastHash< std::string_view >:
ADS::FastHash< const char * > ADS::FastHash< std::string >

Public types

using is_avalanching = void
 the hash needs no further mixing
using is_transparent = void
 for the lookups by any string

Public member functions

template<class A>
void persist (A &a)
 the seed written to, or read from, the archive \( a \) [see Persistence.h]
std::uint64_t hash64 (std::string_view s) const noexcept
 hashBytes() of the characters of \( s \), on 64 bits
std::size_t operator() (std::string_view s) const noexcept
 the low bits of hash64() that a std::size_t holds

Public attributes

std::uint64_t seed = 0
 the seed of hashBytes()

Detailed description

the hash of a string, by its bytes; any std::string_view, std::string and C string with the same characters hash the same

Member typedef documentation

◆ is_avalanching

using ADS::FastHash< std::string_view >::is_avalanching = void

the hash needs no further mixing

◆ is_transparent

using ADS::FastHash< std::string_view >::is_transparent = void

for the lookups by any string

Member function documentation

◆ hash64()

std::uint64_t ADS::FastHash< std::string_view >::hash64 ( std::string_view s) const
inlinenodiscardnoexcept

hashBytes() of the characters of \( s \), on 64 bits

◆ operator()()

std::size_t ADS::FastHash< std::string_view >::operator() ( std::string_view s) const
inlinenodiscardnoexcept

the low bits of hash64() that a std::size_t holds

◆ persist()

template<class A>
void ADS::FastHash< std::string_view >::persist ( A & a)
inline

the seed written to, or read from, the archive \( a \) [see Persistence.h]

Member data documentation

◆ seed

std::uint64_t ADS::FastHash< std::string_view >::seed = 0

the seed of hashBytes()


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