|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
#include <cstddef>#include <cstring>#include <string>#include <concepts>#include <type_traits>#include <cstdint>Go to the source code of this file.
Classes | |
| struct | Aleph::Buf128Bits |
| struct | Aleph::Aleph_Hash< T > |
Primary hash functor used internally by dft_hash_fct / snd_hash_fct. More... | |
| struct | Aleph::Aleph_Hash< float > |
| struct | Aleph::Aleph_Hash< double > |
Namespaces | |
| namespace | Aleph |
| Main namespace for Aleph-w library functions. | |
Concepts | |
| concept | Aleph::HashableByADL |
| Concept: T provides a semantic hash via ADL. | |
Functions | |
| void | Aleph::init_jsw () noexcept |
| Initializes the randomized lookup table used by jsw_hash(). | |
| void | Aleph::init_jsw (std::uint32_t seed) noexcept |
| Initializes the randomized lookup table used by jsw_hash(). | |
| bool | Aleph::is_jsw_initialized () noexcept |
| Checks if the jsw_hash() lookup table has been initialized. | |
| size_t | Aleph::add_hash (const void *key, const size_t len) noexcept |
| Additive hash. | |
| size_t | Aleph::xor_hash (const void *key, const size_t len) noexcept |
| XOR hash. | |
| size_t | Aleph::rot_hash (const void *key, const size_t len) noexcept |
| Rotating hash. | |
| size_t | Aleph::djb_hash (const void *key, const size_t len) noexcept |
| Bernstein's hash (DJB hash) | |
| size_t | Aleph::sax_hash (const void *key, const size_t len) noexcept |
| Shift-Add-XOR hash (SAX hash) | |
| size_t | Aleph::fnv_hash (const void *key, const size_t len) noexcept |
| FNV-1a hash. | |
| size_t | Aleph::oat_hash (const void *key, const size_t len) noexcept |
| One-at-a-Time hash (OAT hash) | |
| size_t | Aleph::jsw_hash (const void *key, size_t len) noexcept |
| JSW hash (Julienne Walker) | |
| size_t | Aleph::elf_hash (const void *key, const size_t len) noexcept |
| ELF hash. | |
| size_t | Aleph::jen_hash (const void *key, size_t len, unsigned initval) noexcept |
| Jenkins hash (lookup3) | |
| void | Aleph::MurmurHash3_x86_32 (const void *key, int len, uint32_t seed, void *out) |
| void | Aleph::MurmurHash3_x86_128 (const void *key, const int len, uint32_t seed, void *out) |
| void | Aleph::MurmurHash3_x64_128 (const void *key, const int len, const uint32_t seed, void *out) |
| template<typename Key > requires std::is_trivially_copyable_v<Key> | |
| size_t | Aleph::murmur3hash (const Key &key, std::uint32_t seed) |
| size_t | Aleph::murmur3hash (const char *key, const std::uint32_t seed) |
| size_t | Aleph::murmur3hash (const std::string &key, const std::uint32_t seed) |
| std::uint16_t | Aleph::get16bits (const void *p) noexcept |
| size_t | Aleph::SuperFastHash (const void *key, size_t len, std::uint32_t seed=0) noexcept |
| Paul Hsieh super fast hash function. | |
| size_t | Aleph::xxhash64_hash (const void *key, size_t len, std::uint64_t seed=Default_Hash_Seed) noexcept |
| xxHash64 from the xxHash family. | |
| size_t | Aleph::wyhash_hash (const void *key, size_t len, std::uint64_t seed=Default_Hash_Seed) noexcept |
| wyhash non-cryptographic hash. | |
| size_t | Aleph::siphash24_hash (const void *key, size_t len, std::uint64_t key0=0x0706050403020100ULL, std::uint64_t key1=0x0f0e0d0c0b0a0908ULL) noexcept |
| SipHash-2-4 keyed hash. | |
| template<typename Key > requires std::is_trivially_copyable_v<Key> | |
| size_t | Aleph::add_hash (const Key &key) noexcept |
| template<typename Key > requires std::is_trivially_copyable_v<Key> | |
| size_t | Aleph::xor_hash (const Key &key) noexcept |
| template<typename Key > requires std::is_trivially_copyable_v<Key> | |
| size_t | Aleph::rot_hash (const Key &key) noexcept |
| template<typename Key > requires std::is_trivially_copyable_v<Key> | |
| size_t | Aleph::djb_hash (const Key &key) noexcept |
| template<typename Key > requires std::is_trivially_copyable_v<Key> | |
| size_t | Aleph::sax_hash (const Key &key) noexcept |
| template<typename Key > requires std::is_trivially_copyable_v<Key> | |
| size_t | Aleph::fnv_hash (const Key &key) noexcept |
| template<typename Key > requires std::is_trivially_copyable_v<Key> | |
| size_t | Aleph::oat_hash (const Key &key) noexcept |
| template<typename Key > requires std::is_trivially_copyable_v<Key> | |
| size_t | Aleph::jsw_hash (const Key &key) noexcept |
| JSW hash for arbitrary key types. | |
| template<typename Key > requires std::is_trivially_copyable_v<Key> | |
| size_t | Aleph::elf_hash (const Key &key) noexcept |
| template<typename Key > requires std::is_trivially_copyable_v<Key> | |
| size_t | Aleph::jen_hash (const Key &key, const unsigned initval) noexcept |
| template<typename Key > requires (std::is_trivially_copyable_v<Key> and (not std::is_pointer_v<Key>) and (not std::is_array_v<Key>)) | |
| size_t | Aleph::SuperFastHash (const Key &key, std::uint32_t seed=0) noexcept |
| template<typename Key > requires std::is_trivially_copyable_v<Key> | |
| size_t | Aleph::xxhash64_hash (const Key &key, std::uint64_t seed=Default_Hash_Seed) noexcept |
| template<typename Key > requires std::is_trivially_copyable_v<Key> | |
| size_t | Aleph::wyhash_hash (const Key &key, std::uint64_t seed=Default_Hash_Seed) noexcept |
| template<typename Key > requires std::is_trivially_copyable_v<Key> | |
| size_t | Aleph::siphash24_hash (const Key &key, std::uint64_t key0=0x0706050403020100ULL, std::uint64_t key1=0x0f0e0d0c0b0a0908ULL) noexcept |
| size_t | Aleph::add_hash (const char *key) noexcept |
| size_t | Aleph::xor_hash (const char *key) noexcept |
| size_t | Aleph::rot_hash (const char *key) noexcept |
| size_t | Aleph::djb_hash (const char *key) noexcept |
| size_t | Aleph::sax_hash (const char *key) noexcept |
| size_t | Aleph::fnv_hash (const char *key) noexcept |
| size_t | Aleph::oat_hash (const char *key) noexcept |
| size_t | Aleph::jsw_hash (const char *key) noexcept |
| Compute a 32-bit JSW hash for a null-terminated string. | |
| size_t | Aleph::elf_hash (const char *key) noexcept |
| size_t | Aleph::SuperFastHash (const char *key, std::uint32_t seed=0) noexcept |
| size_t | Aleph::xxhash64_hash (const char *key, std::uint64_t seed=Default_Hash_Seed) noexcept |
| size_t | Aleph::wyhash_hash (const char *key, std::uint64_t seed=Default_Hash_Seed) noexcept |
| size_t | Aleph::siphash24_hash (const char *key, std::uint64_t key0=0x0706050403020100ULL, std::uint64_t key1=0x0f0e0d0c0b0a0908ULL) noexcept |
| size_t | Aleph::add_hash (const std::string &key) noexcept |
| size_t | Aleph::xor_hash (const std::string &key) noexcept |
| size_t | Aleph::rot_hash (const std::string &key) noexcept |
| size_t | Aleph::djb_hash (const std::string &key) noexcept |
| size_t | Aleph::sax_hash (const std::string &key) noexcept |
| size_t | Aleph::fnv_hash (const std::string &key) noexcept |
| size_t | Aleph::oat_hash (const std::string &key) noexcept |
| size_t | Aleph::jsw_hash (const std::string &key) noexcept |
| JSW hash for std::string. | |
| size_t | Aleph::elf_hash (const std::string &key) noexcept |
| size_t | Aleph::jen_hash (const std::string &key, unsigned initval) noexcept |
| size_t | Aleph::SuperFastHash (const std::string &key, std::uint32_t seed=0) noexcept |
| size_t | Aleph::xxhash64_hash (const std::string &key, std::uint64_t seed=Default_Hash_Seed) noexcept |
| size_t | Aleph::wyhash_hash (const std::string &key, std::uint64_t seed=Default_Hash_Seed) noexcept |
| size_t | Aleph::siphash24_hash (const std::string &key, std::uint64_t key0=0x0706050403020100ULL, std::uint64_t key1=0x0f0e0d0c0b0a0908ULL) noexcept |
| void | Aleph::hash_combine (size_t &seed, size_t h) noexcept |
| Non-commutative hash combiner (Boost-style golden-ratio mix). | |
| template<typename Key > requires (not std::is_pointer_v<Key> and not std::is_array_v<Key> and not std::is_same_v<std::remove_cvref_t<Key>, std::string>) | |
| size_t | Aleph::dft_hash_fct (const Key &key) noexcept |
| Primary default hash: best speed/quality trade-off. | |
| template<typename Key > requires std::is_pointer_v<Key> | |
| size_t | Aleph::dft_hash_fct (const Key &key) noexcept |
| size_t | Aleph::dft_hash_fct (const char *key) noexcept |
| size_t | Aleph::dft_hash_fct (const std::string &key) noexcept |
| template<typename Key > requires (not std::is_pointer_v<Key> and not std::is_array_v<Key> and not std::is_same_v<std::remove_cvref_t<Key>, std::string>) | |
| size_t | Aleph::dft_hash_fct (const Key &key, std::uint32_t seed) noexcept |
| Primary default hash with explicit seed. | |
| template<typename Key > requires std::is_pointer_v<Key> | |
| size_t | Aleph::dft_hash_fct (const Key &key, std::uint32_t seed) noexcept |
| size_t | Aleph::dft_hash_fct (const char *key, std::uint32_t seed) noexcept |
| size_t | Aleph::dft_hash_fct (const std::string &key, std::uint32_t seed) noexcept |
| template<typename Key > | |
| size_t | Aleph::dft_hash_ptr_fct (const Key &key) noexcept |
| template<typename Key > | |
| size_t | Aleph::dft_seed_hash_ptr_fct (const Key &key, const unsigned long seed) noexcept |
| template<typename Key > requires (not std::is_pointer_v<Key> and not std::is_array_v<Key> and not std::is_same_v<std::remove_cvref_t<Key>, std::string>) | |
| size_t | Aleph::snd_hash_fct (const Key &key) noexcept |
Secondary default hash: different distribution from dft_hash_fct. | |
| template<typename Key > requires std::is_pointer_v<Key> | |
| size_t | Aleph::snd_hash_fct (const Key &key) noexcept |
| size_t | Aleph::snd_hash_fct (const char *key) noexcept |
| size_t | Aleph::snd_hash_fct (const std::string &key) noexcept |
| template<typename Key > | |
| size_t | Aleph::snd_hash_ptr_fct (const Key &key) noexcept |
| template<typename Key , typename Data , typename Fct > | |
| size_t | Aleph::map_hash_fct (Fct fct, const std::pair< Key, Data > &p) noexcept |
| template<typename K1 , typename K2 > requires requires(const K1 & k1, const K2 & k2) { dft_hash_fct(k1); dft_hash_fct(k2); } | |
| size_t | Aleph::pair_dft_hash_fct (const std::pair< K1, K2 > &p) noexcept |
| template<typename K1 , typename K2 > requires requires(const K1 & k1, const K2 & k2) { dft_hash_fct(k1); snd_hash_fct(k2); } | |
| size_t | Aleph::pair_snd_hash_fct (const std::pair< K1, K2 > &p) noexcept |
| template<typename K1 , typename K2 > | |
| size_t | Aleph::pair_dft_hash_ptr_fct (const std::pair< K1, K2 > &p) noexcept |
| template<typename K1 , typename K2 > | |
| size_t | Aleph::pair_snd_hash_ptr_fct (const std::pair< K1, K2 > &p) noexcept |
Variables | |
| static constexpr std::uint32_t | Aleph::Aleph_Snd_Hash_Seed = 0x9e3779b9u |
| Fixed seed used by the secondary hash function. | |