hat-trie
Classes | Public Types | Public Member Functions | Static Public Attributes | List of all members
tsl::detail_htrie_hash::htrie_hash< CharT, T, Hash, KeySizeT > Class Template Reference

#include <htrie_hash.h>

Classes

class  htrie_hash_iterator
 

Public Types

using char_type = CharT
 
using key_size_type = KeySizeT
 
using size_type = std::size_t
 
using hasher = Hash
 
using iterator = htrie_hash_iterator< false, false >
 
using const_iterator = htrie_hash_iterator< true, false >
 
using prefix_iterator = htrie_hash_iterator< false, true >
 
using const_prefix_iterator = htrie_hash_iterator< true, true >
 

Public Member Functions

 htrie_hash (const Hash &hash, float max_load_factor, size_type burst_threshold)
 
 htrie_hash (const htrie_hash &other)
 
 htrie_hash (htrie_hash &&other) noexcept(std::is_nothrow_move_constructible< Hash >::value)
 
htrie_hashoperator= (const htrie_hash &other)
 
htrie_hashoperator= (htrie_hash &&other)
 
iterator begin () noexcept
 
const_iterator begin () const noexcept
 
const_iterator cbegin () const noexcept
 
iterator end () noexcept
 
const_iterator end () const noexcept
 
const_iterator cend () const noexcept
 
bool empty () const noexcept
 
size_type size () const noexcept
 
size_type max_size () const noexcept
 
size_type max_key_size () const noexcept
 
void shrink_to_fit ()
 
void clear () noexcept
 
template<class... ValueArgs>
std::pair< iterator, bool > insert (const CharT *key, size_type key_size, ValueArgs &&... value_args)
 
iterator erase (const_iterator pos)
 
iterator erase (const_iterator first, const_iterator last)
 
size_type erase (const CharT *key, size_type key_size)
 
size_type erase_prefix (const CharT *prefix, size_type prefix_size)
 
void swap (htrie_hash &other)
 
template<class U = T, typename std::enable_if< has_value< U >::value >::type * = nullptr>
U & at (const CharT *key, size_type key_size)
 
template<class U = T, typename std::enable_if< has_value< U >::value >::type * = nullptr>
const U & at (const CharT *key, size_type key_size) const
 
template<class U = T, typename std::enable_if< has_value< U >::value >::type * = nullptr>
U & access_operator (const CharT *key, size_type key_size)
 
size_type count (const CharT *key, size_type key_size) const
 
iterator find (const CharT *key, size_type key_size)
 
const_iterator find (const CharT *key, size_type key_size) const
 
std::pair< iterator, iteratorequal_range (const CharT *key, size_type key_size)
 
std::pair< const_iterator, const_iteratorequal_range (const CharT *key, size_type key_size) const
 
std::pair< prefix_iterator, prefix_iteratorequal_prefix_range (const CharT *prefix, size_type prefix_size)
 
std::pair< const_prefix_iterator, const_prefix_iteratorequal_prefix_range (const CharT *prefix, size_type prefix_size) const
 
iterator longest_prefix (const CharT *key, size_type key_size)
 
const_iterator longest_prefix (const CharT *key, size_type key_size) const
 
float max_load_factor () const
 
void max_load_factor (float ml)
 
size_type burst_threshold () const
 
void burst_threshold (size_type threshold)
 
hasher hash_function () const
 
template<class Serializer >
void serialize (Serializer &serializer) const
 
template<class Deserializer >
void deserialize (Deserializer &deserializer, bool hash_compatible)
 

Static Public Attributes

static constexpr float HASH_NODE_DEFAULT_MAX_LOAD_FACTOR = 8.0f
 
static const size_type DEFAULT_BURST_THRESHOLD = 16384
 

Detailed Description

template<class CharT, class T, class Hash, class KeySizeT>
class tsl::detail_htrie_hash::htrie_hash< CharT, T, Hash, KeySizeT >

T should be void if there is no value associated to a key (in a set for example).

Member Typedef Documentation

◆ char_type

template<class CharT, class T, class Hash, class KeySizeT>
using tsl::detail_htrie_hash::htrie_hash< CharT, T, Hash, KeySizeT >::char_type = CharT

◆ const_iterator

template<class CharT, class T, class Hash, class KeySizeT>
using tsl::detail_htrie_hash::htrie_hash< CharT, T, Hash, KeySizeT >::const_iterator = htrie_hash_iterator<true, false>

◆ const_prefix_iterator

template<class CharT, class T, class Hash, class KeySizeT>
using tsl::detail_htrie_hash::htrie_hash< CharT, T, Hash, KeySizeT >::const_prefix_iterator = htrie_hash_iterator<true, true>

◆ hasher

template<class CharT, class T, class Hash, class KeySizeT>
using tsl::detail_htrie_hash::htrie_hash< CharT, T, Hash, KeySizeT >::hasher = Hash

◆ iterator

template<class CharT, class T, class Hash, class KeySizeT>
using tsl::detail_htrie_hash::htrie_hash< CharT, T, Hash, KeySizeT >::iterator = htrie_hash_iterator<false, false>

◆ key_size_type

template<class CharT, class T, class Hash, class KeySizeT>
using tsl::detail_htrie_hash::htrie_hash< CharT, T, Hash, KeySizeT >::key_size_type = KeySizeT

◆ prefix_iterator

template<class CharT, class T, class Hash, class KeySizeT>
using tsl::detail_htrie_hash::htrie_hash< CharT, T, Hash, KeySizeT >::prefix_iterator = htrie_hash_iterator<false, true>

◆ size_type

template<class CharT, class T, class Hash, class KeySizeT>
using tsl::detail_htrie_hash::htrie_hash< CharT, T, Hash, KeySizeT >::size_type = std::size_t

Constructor & Destructor Documentation

◆ htrie_hash() [1/3]

template<class CharT, class T, class Hash, class KeySizeT>
tsl::detail_htrie_hash::htrie_hash< CharT, T, Hash, KeySizeT >::htrie_hash ( const Hash &  hash,
float  max_load_factor,
size_type  burst_threshold 
)
inline

◆ htrie_hash() [2/3]

template<class CharT, class T, class Hash, class KeySizeT>
tsl::detail_htrie_hash::htrie_hash< CharT, T, Hash, KeySizeT >::htrie_hash ( const htrie_hash< CharT, T, Hash, KeySizeT > &  other)
inline

◆ htrie_hash() [3/3]

template<class CharT, class T, class Hash, class KeySizeT>
tsl::detail_htrie_hash::htrie_hash< CharT, T, Hash, KeySizeT >::htrie_hash ( htrie_hash< CharT, T, Hash, KeySizeT > &&  other)
inlinenoexcept

Member Function Documentation

◆ access_operator()

template<class CharT, class T, class Hash, class KeySizeT>
template<class U = T, typename std::enable_if< has_value< U >::value >::type * = nullptr>
U& tsl::detail_htrie_hash::htrie_hash< CharT, T, Hash, KeySizeT >::access_operator ( const CharT *  key,
size_type  key_size 
)
inline

◆ at() [1/2]

template<class CharT, class T, class Hash, class KeySizeT>
template<class U = T, typename std::enable_if< has_value< U >::value >::type * = nullptr>
U& tsl::detail_htrie_hash::htrie_hash< CharT, T, Hash, KeySizeT >::at ( const CharT *  key,
size_type  key_size 
)
inline

◆ at() [2/2]

template<class CharT, class T, class Hash, class KeySizeT>
template<class U = T, typename std::enable_if< has_value< U >::value >::type * = nullptr>
const U& tsl::detail_htrie_hash::htrie_hash< CharT, T, Hash, KeySizeT >::at ( const CharT *  key,
size_type  key_size 
) const
inline

◆ begin() [1/2]

template<class CharT, class T, class Hash, class KeySizeT>
iterator tsl::detail_htrie_hash::htrie_hash< CharT, T, Hash, KeySizeT >::begin ( )
inlinenoexcept

◆ begin() [2/2]

template<class CharT, class T, class Hash, class KeySizeT>
const_iterator tsl::detail_htrie_hash::htrie_hash< CharT, T, Hash, KeySizeT >::begin ( ) const
inlinenoexcept

◆ burst_threshold() [1/2]

template<class CharT, class T, class Hash, class KeySizeT>
size_type tsl::detail_htrie_hash::htrie_hash< CharT, T, Hash, KeySizeT >::burst_threshold ( ) const
inline

◆ burst_threshold() [2/2]

template<class CharT, class T, class Hash, class KeySizeT>
void tsl::detail_htrie_hash::htrie_hash< CharT, T, Hash, KeySizeT >::burst_threshold ( size_type  threshold)
inline

◆ cbegin()

template<class CharT, class T, class Hash, class KeySizeT>
const_iterator tsl::detail_htrie_hash::htrie_hash< CharT, T, Hash, KeySizeT >::cbegin ( ) const
inlinenoexcept

◆ cend()

template<class CharT, class T, class Hash, class KeySizeT>
const_iterator tsl::detail_htrie_hash::htrie_hash< CharT, T, Hash, KeySizeT >::cend ( ) const
inlinenoexcept

◆ clear()

template<class CharT, class T, class Hash, class KeySizeT>
void tsl::detail_htrie_hash::htrie_hash< CharT, T, Hash, KeySizeT >::clear ( )
inlinenoexcept

◆ count()

template<class CharT, class T, class Hash, class KeySizeT>
size_type tsl::detail_htrie_hash::htrie_hash< CharT, T, Hash, KeySizeT >::count ( const CharT *  key,
size_type  key_size 
) const
inline

◆ deserialize()

template<class CharT, class T, class Hash, class KeySizeT>
template<class Deserializer >
void tsl::detail_htrie_hash::htrie_hash< CharT, T, Hash, KeySizeT >::deserialize ( Deserializer &  deserializer,
bool  hash_compatible 
)
inline

◆ empty()

template<class CharT, class T, class Hash, class KeySizeT>
bool tsl::detail_htrie_hash::htrie_hash< CharT, T, Hash, KeySizeT >::empty ( ) const
inlinenoexcept

◆ end() [1/2]

template<class CharT, class T, class Hash, class KeySizeT>
iterator tsl::detail_htrie_hash::htrie_hash< CharT, T, Hash, KeySizeT >::end ( )
inlinenoexcept

◆ end() [2/2]

template<class CharT, class T, class Hash, class KeySizeT>
const_iterator tsl::detail_htrie_hash::htrie_hash< CharT, T, Hash, KeySizeT >::end ( ) const
inlinenoexcept

◆ equal_prefix_range() [1/2]

template<class CharT, class T, class Hash, class KeySizeT>
std::pair<prefix_iterator, prefix_iterator> tsl::detail_htrie_hash::htrie_hash< CharT, T, Hash, KeySizeT >::equal_prefix_range ( const CharT *  prefix,
size_type  prefix_size 
)
inline

◆ equal_prefix_range() [2/2]

template<class CharT, class T, class Hash, class KeySizeT>
std::pair<const_prefix_iterator, const_prefix_iterator> tsl::detail_htrie_hash::htrie_hash< CharT, T, Hash, KeySizeT >::equal_prefix_range ( const CharT *  prefix,
size_type  prefix_size 
) const
inline

◆ equal_range() [1/2]

template<class CharT, class T, class Hash, class KeySizeT>
std::pair<iterator, iterator> tsl::detail_htrie_hash::htrie_hash< CharT, T, Hash, KeySizeT >::equal_range ( const CharT *  key,
size_type  key_size 
)
inline

◆ equal_range() [2/2]

template<class CharT, class T, class Hash, class KeySizeT>
std::pair<const_iterator, const_iterator> tsl::detail_htrie_hash::htrie_hash< CharT, T, Hash, KeySizeT >::equal_range ( const CharT *  key,
size_type  key_size 
) const
inline

◆ erase() [1/3]

template<class CharT, class T, class Hash, class KeySizeT>
iterator tsl::detail_htrie_hash::htrie_hash< CharT, T, Hash, KeySizeT >::erase ( const_iterator  pos)
inline

◆ erase() [2/3]

template<class CharT, class T, class Hash, class KeySizeT>
iterator tsl::detail_htrie_hash::htrie_hash< CharT, T, Hash, KeySizeT >::erase ( const_iterator  first,
const_iterator  last 
)
inline

◆ erase() [3/3]

template<class CharT, class T, class Hash, class KeySizeT>
size_type tsl::detail_htrie_hash::htrie_hash< CharT, T, Hash, KeySizeT >::erase ( const CharT *  key,
size_type  key_size 
)
inline

◆ erase_prefix()

template<class CharT, class T, class Hash, class KeySizeT>
size_type tsl::detail_htrie_hash::htrie_hash< CharT, T, Hash, KeySizeT >::erase_prefix ( const CharT *  prefix,
size_type  prefix_size 
)
inline

◆ find() [1/2]

template<class CharT, class T, class Hash, class KeySizeT>
iterator tsl::detail_htrie_hash::htrie_hash< CharT, T, Hash, KeySizeT >::find ( const CharT *  key,
size_type  key_size 
)
inline

◆ find() [2/2]

template<class CharT, class T, class Hash, class KeySizeT>
const_iterator tsl::detail_htrie_hash::htrie_hash< CharT, T, Hash, KeySizeT >::find ( const CharT *  key,
size_type  key_size 
) const
inline

◆ hash_function()

template<class CharT, class T, class Hash, class KeySizeT>
hasher tsl::detail_htrie_hash::htrie_hash< CharT, T, Hash, KeySizeT >::hash_function ( ) const
inline

◆ insert()

template<class CharT, class T, class Hash, class KeySizeT>
template<class... ValueArgs>
std::pair<iterator, bool> tsl::detail_htrie_hash::htrie_hash< CharT, T, Hash, KeySizeT >::insert ( const CharT *  key,
size_type  key_size,
ValueArgs &&...  value_args 
)
inline

◆ longest_prefix() [1/2]

template<class CharT, class T, class Hash, class KeySizeT>
iterator tsl::detail_htrie_hash::htrie_hash< CharT, T, Hash, KeySizeT >::longest_prefix ( const CharT *  key,
size_type  key_size 
)
inline

◆ longest_prefix() [2/2]

template<class CharT, class T, class Hash, class KeySizeT>
const_iterator tsl::detail_htrie_hash::htrie_hash< CharT, T, Hash, KeySizeT >::longest_prefix ( const CharT *  key,
size_type  key_size 
) const
inline

◆ max_key_size()

template<class CharT, class T, class Hash, class KeySizeT>
size_type tsl::detail_htrie_hash::htrie_hash< CharT, T, Hash, KeySizeT >::max_key_size ( ) const
inlinenoexcept

◆ max_load_factor() [1/2]

template<class CharT, class T, class Hash, class KeySizeT>
float tsl::detail_htrie_hash::htrie_hash< CharT, T, Hash, KeySizeT >::max_load_factor ( ) const
inline

◆ max_load_factor() [2/2]

template<class CharT, class T, class Hash, class KeySizeT>
void tsl::detail_htrie_hash::htrie_hash< CharT, T, Hash, KeySizeT >::max_load_factor ( float  ml)
inline

◆ max_size()

template<class CharT, class T, class Hash, class KeySizeT>
size_type tsl::detail_htrie_hash::htrie_hash< CharT, T, Hash, KeySizeT >::max_size ( ) const
inlinenoexcept

◆ operator=() [1/2]

template<class CharT, class T, class Hash, class KeySizeT>
htrie_hash& tsl::detail_htrie_hash::htrie_hash< CharT, T, Hash, KeySizeT >::operator= ( const htrie_hash< CharT, T, Hash, KeySizeT > &  other)
inline

◆ operator=() [2/2]

template<class CharT, class T, class Hash, class KeySizeT>
htrie_hash& tsl::detail_htrie_hash::htrie_hash< CharT, T, Hash, KeySizeT >::operator= ( htrie_hash< CharT, T, Hash, KeySizeT > &&  other)
inline

◆ serialize()

template<class CharT, class T, class Hash, class KeySizeT>
template<class Serializer >
void tsl::detail_htrie_hash::htrie_hash< CharT, T, Hash, KeySizeT >::serialize ( Serializer &  serializer) const
inline

◆ shrink_to_fit()

template<class CharT, class T, class Hash, class KeySizeT>
void tsl::detail_htrie_hash::htrie_hash< CharT, T, Hash, KeySizeT >::shrink_to_fit ( )
inline

◆ size()

template<class CharT, class T, class Hash, class KeySizeT>
size_type tsl::detail_htrie_hash::htrie_hash< CharT, T, Hash, KeySizeT >::size ( ) const
inlinenoexcept

◆ swap()

template<class CharT, class T, class Hash, class KeySizeT>
void tsl::detail_htrie_hash::htrie_hash< CharT, T, Hash, KeySizeT >::swap ( htrie_hash< CharT, T, Hash, KeySizeT > &  other)
inline

Member Data Documentation

◆ DEFAULT_BURST_THRESHOLD

template<class CharT, class T, class Hash, class KeySizeT>
const size_type tsl::detail_htrie_hash::htrie_hash< CharT, T, Hash, KeySizeT >::DEFAULT_BURST_THRESHOLD = 16384
static

◆ HASH_NODE_DEFAULT_MAX_LOAD_FACTOR

template<class CharT, class T, class Hash, class KeySizeT>
constexpr float tsl::detail_htrie_hash::htrie_hash< CharT, T, Hash, KeySizeT >::HASH_NODE_DEFAULT_MAX_LOAD_FACTOR = 8.0f
static

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