tudocomp
– The TU Dortmund Compression Framework
tdc::HashMap< Key, Value, undef_id, HashFcn, EqualKey, ProbeFcn, SizeManager > Class Template Reference

#include <Hash.hpp>

Classes

class  Iterator
 

Public Types

typedef Key key_t
 
typedef Value value_t
 
typedef std::pair< key_t, value_tstore_t
 

Public Member Functions

 IF_STATS (size_t m_collisions=0;size_t m_old_size=0;size_t m_resizes=0;size_t m_specialresizes=0;) public
 
float max_load_factor () const noexcept
 
 HashMap (Env &, const size_t n, const size_t &remaining_characters)
 
template<class T >
void incorporate (T &&o, len_t newsize)
 
 ~HashMap ()
 
 HashMap (HashMap &&other)=default
 
HashMapoperator= (HashMap &&other)=default
 
void reserve (len_t hint)
 
len_t entries () const
 
len_t table_size () const
 
len_t empty () const
 
std::pair< Iterator, bool > insert (std::pair< key_t, value_t > &&value)
 

Static Public Member Functions

static Meta meta ()
 

Public Attributes

EqualKey m_eq
 
HashFcn m_h
 
ProbeFcn m_probe
 
SizeManager m_sizeman
 
size_t m_size
 
key_tm_keys
 
value_tm_values
 
len_t m_entries = 0
 
float m_load_factor = 0.3f
 
const size_t m_n
 
const size_t & m_remaining_characters
 
MoveGuard m_guard
 

Static Public Attributes

static constexpr value_t empty_val = undef_id
 
static constexpr len_t initial_size = 4
 

Detailed Description

template<class Key, class Value, Value undef_id, class HashFcn = MixHasher, class EqualKey = std::equal_to<Key>, class ProbeFcn = QuadraticProber, class SizeManager = SizeManagerPow2>
class tdc::HashMap< Key, Value, undef_id, HashFcn, EqualKey, ProbeFcn, SizeManager >

Definition at line 362 of file Hash.hpp.

Member Typedef Documentation

template<class Key, class Value, Value undef_id, class HashFcn = MixHasher, class EqualKey = std::equal_to<Key>, class ProbeFcn = QuadraticProber, class SizeManager = SizeManagerPow2>
typedef Key tdc::HashMap< Key, Value, undef_id, HashFcn, EqualKey, ProbeFcn, SizeManager >::key_t

Definition at line 365 of file Hash.hpp.

template<class Key, class Value, Value undef_id, class HashFcn = MixHasher, class EqualKey = std::equal_to<Key>, class ProbeFcn = QuadraticProber, class SizeManager = SizeManagerPow2>
typedef std::pair<key_t,value_t> tdc::HashMap< Key, Value, undef_id, HashFcn, EqualKey, ProbeFcn, SizeManager >::store_t

Definition at line 367 of file Hash.hpp.

template<class Key, class Value, Value undef_id, class HashFcn = MixHasher, class EqualKey = std::equal_to<Key>, class ProbeFcn = QuadraticProber, class SizeManager = SizeManagerPow2>
typedef Value tdc::HashMap< Key, Value, undef_id, HashFcn, EqualKey, ProbeFcn, SizeManager >::value_t

Definition at line 366 of file Hash.hpp.

Constructor & Destructor Documentation

template<class Key, class Value, Value undef_id, class HashFcn = MixHasher, class EqualKey = std::equal_to<Key>, class ProbeFcn = QuadraticProber, class SizeManager = SizeManagerPow2>
tdc::HashMap< Key, Value, undef_id, HashFcn, EqualKey, ProbeFcn, SizeManager >::HashMap ( Env ,
const size_t  n,
const size_t &  remaining_characters 
)
inline

Definition at line 415 of file Hash.hpp.

template<class Key, class Value, Value undef_id, class HashFcn = MixHasher, class EqualKey = std::equal_to<Key>, class ProbeFcn = QuadraticProber, class SizeManager = SizeManagerPow2>
tdc::HashMap< Key, Value, undef_id, HashFcn, EqualKey, ProbeFcn, SizeManager >::~HashMap ( )
inline

Definition at line 452 of file Hash.hpp.

template<class Key, class Value, Value undef_id, class HashFcn = MixHasher, class EqualKey = std::equal_to<Key>, class ProbeFcn = QuadraticProber, class SizeManager = SizeManagerPow2>
tdc::HashMap< Key, Value, undef_id, HashFcn, EqualKey, ProbeFcn, SizeManager >::HashMap ( HashMap< Key, Value, undef_id, HashFcn, EqualKey, ProbeFcn, SizeManager > &&  other)
inlinedefault

Member Function Documentation

template<class Key, class Value, Value undef_id, class HashFcn = MixHasher, class EqualKey = std::equal_to<Key>, class ProbeFcn = QuadraticProber, class SizeManager = SizeManagerPow2>
len_t tdc::HashMap< Key, Value, undef_id, HashFcn, EqualKey, ProbeFcn, SizeManager >::empty ( ) const
inline

Definition at line 516 of file Hash.hpp.

template<class Key, class Value, Value undef_id, class HashFcn = MixHasher, class EqualKey = std::equal_to<Key>, class ProbeFcn = QuadraticProber, class SizeManager = SizeManagerPow2>
len_t tdc::HashMap< Key, Value, undef_id, HashFcn, EqualKey, ProbeFcn, SizeManager >::entries ( ) const
inline

Definition at line 514 of file Hash.hpp.

template<class Key, class Value, Value undef_id, class HashFcn = MixHasher, class EqualKey = std::equal_to<Key>, class ProbeFcn = QuadraticProber, class SizeManager = SizeManagerPow2>
tdc::HashMap< Key, Value, undef_id, HashFcn, EqualKey, ProbeFcn, SizeManager >::IF_STATS ( size_t  m_collisions = 0; size_t m_old_size = 0; size_t m_resizes = 0; size_t m_specialresizes = 0;)
inline

Definition at line 386 of file Hash.hpp.

template<class Key, class Value, Value undef_id, class HashFcn = MixHasher, class EqualKey = std::equal_to<Key>, class ProbeFcn = QuadraticProber, class SizeManager = SizeManagerPow2>
template<class T >
void tdc::HashMap< Key, Value, undef_id, HashFcn, EqualKey, ProbeFcn, SizeManager >::incorporate ( T &&  o,
len_t  newsize 
)
inline

Definition at line 430 of file Hash.hpp.

template<class Key, class Value, Value undef_id, class HashFcn = MixHasher, class EqualKey = std::equal_to<Key>, class ProbeFcn = QuadraticProber, class SizeManager = SizeManagerPow2>
std::pair<Iterator,bool> tdc::HashMap< Key, Value, undef_id, HashFcn, EqualKey, ProbeFcn, SizeManager >::insert ( std::pair< key_t, value_t > &&  value)
inline

Definition at line 518 of file Hash.hpp.

template<class Key, class Value, Value undef_id, class HashFcn = MixHasher, class EqualKey = std::equal_to<Key>, class ProbeFcn = QuadraticProber, class SizeManager = SizeManagerPow2>
float tdc::HashMap< Key, Value, undef_id, HashFcn, EqualKey, ProbeFcn, SizeManager >::max_load_factor ( ) const
inlinenoexcept

Definition at line 409 of file Hash.hpp.

template<class Key, class Value, Value undef_id, class HashFcn = MixHasher, class EqualKey = std::equal_to<Key>, class ProbeFcn = QuadraticProber, class SizeManager = SizeManagerPow2>
static Meta tdc::HashMap< Key, Value, undef_id, HashFcn, EqualKey, ProbeFcn, SizeManager >::meta ( )
inlinestatic

Definition at line 369 of file Hash.hpp.

template<class Key, class Value, Value undef_id, class HashFcn = MixHasher, class EqualKey = std::equal_to<Key>, class ProbeFcn = QuadraticProber, class SizeManager = SizeManagerPow2>
HashMap& tdc::HashMap< Key, Value, undef_id, HashFcn, EqualKey, ProbeFcn, SizeManager >::operator= ( HashMap< Key, Value, undef_id, HashFcn, EqualKey, ProbeFcn, SizeManager > &&  other)
inlinedefault
template<class Key, class Value, Value undef_id, class HashFcn = MixHasher, class EqualKey = std::equal_to<Key>, class ProbeFcn = QuadraticProber, class SizeManager = SizeManagerPow2>
void tdc::HashMap< Key, Value, undef_id, HashFcn, EqualKey, ProbeFcn, SizeManager >::reserve ( len_t  hint)
inline

Definition at line 461 of file Hash.hpp.

template<class Key, class Value, Value undef_id, class HashFcn = MixHasher, class EqualKey = std::equal_to<Key>, class ProbeFcn = QuadraticProber, class SizeManager = SizeManagerPow2>
len_t tdc::HashMap< Key, Value, undef_id, HashFcn, EqualKey, ProbeFcn, SizeManager >::table_size ( ) const
inline

Definition at line 515 of file Hash.hpp.

Member Data Documentation

template<class Key, class Value, Value undef_id, class HashFcn = MixHasher, class EqualKey = std::equal_to<Key>, class ProbeFcn = QuadraticProber, class SizeManager = SizeManagerPow2>
constexpr value_t tdc::HashMap< Key, Value, undef_id, HashFcn, EqualKey, ProbeFcn, SizeManager >::empty_val = undef_id
static

Definition at line 384 of file Hash.hpp.

template<class Key, class Value, Value undef_id, class HashFcn = MixHasher, class EqualKey = std::equal_to<Key>, class ProbeFcn = QuadraticProber, class SizeManager = SizeManagerPow2>
constexpr len_t tdc::HashMap< Key, Value, undef_id, HashFcn, EqualKey, ProbeFcn, SizeManager >::initial_size = 4
static

Definition at line 385 of file Hash.hpp.

template<class Key, class Value, Value undef_id, class HashFcn = MixHasher, class EqualKey = std::equal_to<Key>, class ProbeFcn = QuadraticProber, class SizeManager = SizeManagerPow2>
len_t tdc::HashMap< Key, Value, undef_id, HashFcn, EqualKey, ProbeFcn, SizeManager >::m_entries = 0

Definition at line 382 of file Hash.hpp.

template<class Key, class Value, Value undef_id, class HashFcn = MixHasher, class EqualKey = std::equal_to<Key>, class ProbeFcn = QuadraticProber, class SizeManager = SizeManagerPow2>
EqualKey tdc::HashMap< Key, Value, undef_id, HashFcn, EqualKey, ProbeFcn, SizeManager >::m_eq

Definition at line 375 of file Hash.hpp.

template<class Key, class Value, Value undef_id, class HashFcn = MixHasher, class EqualKey = std::equal_to<Key>, class ProbeFcn = QuadraticProber, class SizeManager = SizeManagerPow2>
MoveGuard tdc::HashMap< Key, Value, undef_id, HashFcn, EqualKey, ProbeFcn, SizeManager >::m_guard

Definition at line 451 of file Hash.hpp.

template<class Key, class Value, Value undef_id, class HashFcn = MixHasher, class EqualKey = std::equal_to<Key>, class ProbeFcn = QuadraticProber, class SizeManager = SizeManagerPow2>
HashFcn tdc::HashMap< Key, Value, undef_id, HashFcn, EqualKey, ProbeFcn, SizeManager >::m_h

Definition at line 376 of file Hash.hpp.

template<class Key, class Value, Value undef_id, class HashFcn = MixHasher, class EqualKey = std::equal_to<Key>, class ProbeFcn = QuadraticProber, class SizeManager = SizeManagerPow2>
key_t* tdc::HashMap< Key, Value, undef_id, HashFcn, EqualKey, ProbeFcn, SizeManager >::m_keys

Definition at line 380 of file Hash.hpp.

template<class Key, class Value, Value undef_id, class HashFcn = MixHasher, class EqualKey = std::equal_to<Key>, class ProbeFcn = QuadraticProber, class SizeManager = SizeManagerPow2>
float tdc::HashMap< Key, Value, undef_id, HashFcn, EqualKey, ProbeFcn, SizeManager >::m_load_factor = 0.3f

Definition at line 383 of file Hash.hpp.

template<class Key, class Value, Value undef_id, class HashFcn = MixHasher, class EqualKey = std::equal_to<Key>, class ProbeFcn = QuadraticProber, class SizeManager = SizeManagerPow2>
const size_t tdc::HashMap< Key, Value, undef_id, HashFcn, EqualKey, ProbeFcn, SizeManager >::m_n

Definition at line 412 of file Hash.hpp.

template<class Key, class Value, Value undef_id, class HashFcn = MixHasher, class EqualKey = std::equal_to<Key>, class ProbeFcn = QuadraticProber, class SizeManager = SizeManagerPow2>
ProbeFcn tdc::HashMap< Key, Value, undef_id, HashFcn, EqualKey, ProbeFcn, SizeManager >::m_probe

Definition at line 377 of file Hash.hpp.

template<class Key, class Value, Value undef_id, class HashFcn = MixHasher, class EqualKey = std::equal_to<Key>, class ProbeFcn = QuadraticProber, class SizeManager = SizeManagerPow2>
const size_t& tdc::HashMap< Key, Value, undef_id, HashFcn, EqualKey, ProbeFcn, SizeManager >::m_remaining_characters

Definition at line 413 of file Hash.hpp.

template<class Key, class Value, Value undef_id, class HashFcn = MixHasher, class EqualKey = std::equal_to<Key>, class ProbeFcn = QuadraticProber, class SizeManager = SizeManagerPow2>
size_t tdc::HashMap< Key, Value, undef_id, HashFcn, EqualKey, ProbeFcn, SizeManager >::m_size

Definition at line 379 of file Hash.hpp.

template<class Key, class Value, Value undef_id, class HashFcn = MixHasher, class EqualKey = std::equal_to<Key>, class ProbeFcn = QuadraticProber, class SizeManager = SizeManagerPow2>
SizeManager tdc::HashMap< Key, Value, undef_id, HashFcn, EqualKey, ProbeFcn, SizeManager >::m_sizeman

Definition at line 378 of file Hash.hpp.

template<class Key, class Value, Value undef_id, class HashFcn = MixHasher, class EqualKey = std::equal_to<Key>, class ProbeFcn = QuadraticProber, class SizeManager = SizeManagerPow2>
value_t* tdc::HashMap< Key, Value, undef_id, HashFcn, EqualKey, ProbeFcn, SizeManager >::m_values

Definition at line 381 of file Hash.hpp.


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