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

Storage class for hash tables with key, value pairs that should be stored externally from the probing table. More...

#include <hash_storage.h>

Inheritance diagram for meta::hashing::external_key_value_storage< K, V, ProbingStrategy, Hash, KeyEqual >:
meta::hashing::storage_base< external_key_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 idx_vector_type = util::aligned_vector< hash_idx >
 
using kv_vector_type = util::aligned_vector< std::pair< K, V >>
 
- Public Types inherited from meta::hashing::storage_base< external_key_value_storage< K, V, ProbingStrategy, Hash, KeyEqual > >
using iterator = typename storage_traits< external_key_value_storage< K, V, ProbingStrategy, Hash, KeyEqual > >::iterator
 
using const_iterator = typename storage_traits< external_key_value_storage< K, V, ProbingStrategy, Hash, KeyEqual > >::const_iterator
 
using key_type = typename storage_traits< external_key_value_storage< K, V, ProbingStrategy, Hash, KeyEqual > >::key_type
 
using stored_type = typename storage_traits< external_key_value_storage< K, V, ProbingStrategy, Hash, KeyEqual > >::stored_type
 
using probing_strategy = typename storage_traits< external_key_value_storage< K, V, ProbingStrategy, Hash, KeyEqual > >::probing_strategy
 
using hash_type = typename storage_traits< external_key_value_storage< K, V, ProbingStrategy, Hash, KeyEqual > >::hash_type
 
using equal_type = typename storage_traits< external_key_value_storage< K, V, ProbingStrategy, Hash, KeyEqual > >::equal_type
 

Public Member Functions

 external_key_value_storage (std::size_t capacity)
 
bool occupied (std::size_t idx) const
 
bool equal (std::size_t idx, std::size_t hc, 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 hc, 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
 
kv_vector_type extract () &&
 
- Public Member Functions inherited from meta::hashing::storage_base< external_key_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

idx_vector_type table_
 
kv_vector_type storage_
 

Additional Inherited Members

- Static Public Member Functions inherited from meta::hashing::storage_base< external_key_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::external_key_value_storage< K, V, ProbingStrategy, Hash, KeyEqual >

Storage class for hash tables with key, value pairs that should be stored externally from the probing table.


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