ModErn Text Analysis
META Enumerates Textual Applications
Public Types | Public Member Functions | Public Attributes | List of all members
meta::hashing::inline_key_external_value_storage< K, V, ProbingStrategy, Hash, KeyEqual > Class Template Reference

Storage class for hash tables with keys that can be inlined into the probing table, but values that should be stored externally. More...

#include <hash_storage.h>

Inheritance diagram for meta::hashing::inline_key_external_value_storage< K, V, ProbingStrategy, Hash, KeyEqual >:
meta::hashing::storage_base< inline_key_external_value_storage< K, V, ProbingStrategy, Hash, KeyEqual > >

Public Types

using value_type = kv_pair< K, V >
 
using const_value_type = kv_pair< K, const V >
 
using key_vector_type = util::aligned_vector< std::pair< K, std::size_t >>
 
using value_vector_type = util::aligned_vector< V >
 
- Public Types inherited from meta::hashing::storage_base< inline_key_external_value_storage< K, V, ProbingStrategy, Hash, KeyEqual > >
using iterator = typename storage_traits< inline_key_external_value_storage< K, V, ProbingStrategy, Hash, KeyEqual > >::iterator
 
using const_iterator = typename storage_traits< inline_key_external_value_storage< K, V, ProbingStrategy, Hash, KeyEqual > >::const_iterator
 
using key_type = typename storage_traits< inline_key_external_value_storage< K, V, ProbingStrategy, Hash, KeyEqual > >::key_type
 
using stored_type = typename storage_traits< inline_key_external_value_storage< K, V, ProbingStrategy, Hash, KeyEqual > >::stored_type
 
using probing_strategy = typename storage_traits< inline_key_external_value_storage< K, V, ProbingStrategy, Hash, KeyEqual > >::probing_strategy
 
using hash_type = typename storage_traits< inline_key_external_value_storage< K, V, ProbingStrategy, Hash, KeyEqual > >::hash_type
 
using equal_type = typename storage_traits< inline_key_external_value_storage< K, V, ProbingStrategy, Hash, KeyEqual > >::equal_type
 

Public Member Functions

 inline_key_external_value_storage (std::size_t capacity)
 
bool occupied (std::size_t idx) const
 
bool equal (std::size_t idx, std::size_t, const K &key) const
 
const_value_type operator[] (std::size_t idx) const
 
value_type operator[] (std::size_t idx)
 
template<class... Args>
void put (std::size_t idx, std::size_t, Args &&... args)
 
std::size_t size () const
 
std::size_t capacity () const
 
void clear ()
 
void resize (std::size_t new_cap)
 
std::size_t bytes_used () const
 
std::vector< std::pair< K, V > > extract () &&
 
- Public Member Functions inherited from meta::hashing::storage_base< inline_key_external_value_storage< K, V, ProbingStrategy, Hash, KeyEqual > >
iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
double max_load_factor () const
 
void max_load_factor (double mlf)
 Sets the maximum allowed load factor for this table. More...
 
double resize_ratio () const
 
void resize_ratio (double rratio)
 
std::size_t get_idx (const key_type &key, typename hash_type::result_type hc) const
 Uses the specified ProbingStrategy to find the specified element (or the next open slot). More...
 
iterator emplace (Args &&... args)
 
const_iterator find (const key_type &key) const
 
iterator find (const key_type &key)
 
bool empty () const
 
double next_load_factor () const
 
std::size_t next_size () const
 
bool key_equal (const key_type &k1, const key_type &k2) const
 
std::size_t hash (const key_type &key) const
 

Public Attributes

key_vector_type table_
 
value_vector_type values_
 

Additional Inherited Members

- Static Public Member Functions inherited from meta::hashing::storage_base< inline_key_external_value_storage< K, V, ProbingStrategy, Hash, KeyEqual > >
static constexpr double default_max_load_factor ()
 
static constexpr double default_resize_ratio ()
 

Detailed Description

template<class K, class V, class ProbingStrategy, class Hash, class KeyEqual>
class meta::hashing::inline_key_external_value_storage< K, V, ProbingStrategy, Hash, KeyEqual >

Storage class for hash tables with keys that can be inlined into the probing table, but values that should be stored externally.


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