![]() |
mutable
A Database System for Research and Fast Prototyping
|
#include <RefCountingHashMap.hpp>
Data Structures | |
struct | entry_type |
struct | the_bucket_iterator |
struct | the_iterator |
Public Types | |
using | key_type = Key |
using | mapped_type = Value |
using | value_type = std::pair< const Key, Value > |
using | hasher = Hash |
using | key_equal = KeyEqual |
using | pointer = value_type * |
using | const_pointer = const value_type * |
using | reference = value_type & |
using | const_reference = const value_type & |
using | size_type = std::size_t |
using | difference_type = std::ptrdiff_t |
using | iterator = the_iterator< false > |
using | const_iterator = the_iterator< true > |
using | bucket_iterator = the_bucket_iterator< false > |
using | const_bucket_iterator = the_bucket_iterator< true > |
Private Member Functions | |
void | rehash (std::size_t new_capacity) |
Rehash all elements. | |
void | initialize () |
Static Private Member Functions | |
static entry_type * | allocate (size_type n, entry_type *hint=nullptr) |
Private Attributes | |
const hasher | h_ |
const key_equal | eq_ |
entry_type * | table_ = nullptr |
A pointer to the beginning of the table. | |
size_type | capacity_ = 0 |
The total number of entries allocated in the table. | |
size_type | size_ = 0 |
The number of occupied entries in the table. | |
size_type | watermark_high_ |
The maximum size before resizing. | |
float | max_load_factor_ = .85 |
The maximum load factor before resizing. | |
Friends | |
M_LCOV_EXCL_START friend std::ostream & | operator<< (std::ostream &out, const RefCountingHashMap &map) |
Definition at line 31 of file RefCountingHashMap.hpp.
using m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::bucket_iterator = the_bucket_iterator<false> |
Definition at line 150 of file RefCountingHashMap.hpp.
using m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::const_bucket_iterator = the_bucket_iterator<true> |
Definition at line 151 of file RefCountingHashMap.hpp.
using m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::const_iterator = the_iterator<true> |
Definition at line 148 of file RefCountingHashMap.hpp.
using m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::const_pointer = const value_type* |
Definition at line 39 of file RefCountingHashMap.hpp.
using m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::const_reference = const value_type& |
Definition at line 41 of file RefCountingHashMap.hpp.
using m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::difference_type = std::ptrdiff_t |
Definition at line 43 of file RefCountingHashMap.hpp.
using m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::hasher = Hash |
Definition at line 36 of file RefCountingHashMap.hpp.
using m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::iterator = the_iterator<false> |
Definition at line 147 of file RefCountingHashMap.hpp.
using m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::key_equal = KeyEqual |
Definition at line 37 of file RefCountingHashMap.hpp.
using m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::key_type = Key |
Definition at line 33 of file RefCountingHashMap.hpp.
using m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::mapped_type = Value |
Definition at line 34 of file RefCountingHashMap.hpp.
using m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::pointer = value_type* |
Definition at line 38 of file RefCountingHashMap.hpp.
using m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::reference = value_type& |
Definition at line 40 of file RefCountingHashMap.hpp.
using m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::size_type = std::size_t |
Definition at line 42 of file RefCountingHashMap.hpp.
using m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::value_type = std::pair<const Key, Value> |
Definition at line 35 of file RefCountingHashMap.hpp.
|
inline |
Definition at line 169 of file RefCountingHashMap.hpp.
References m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::allocate(), m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::capacity_, m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::initialize(), m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::max_load_factor_, m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::table_, and m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::watermark_high_.
|
inline |
|
inlinestaticprivate |
Definition at line 398 of file RefCountingHashMap.hpp.
Referenced by m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::RefCountingHashMap(), and m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::rehash().
|
inline |
Definition at line 206 of file RefCountingHashMap.hpp.
References m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::table_.
Referenced by m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::cbegin().
|
inline |
Definition at line 208 of file RefCountingHashMap.hpp.
References m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::table_.
|
inline |
Definition at line 311 of file RefCountingHashMap.hpp.
References m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::h_, and m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::masked().
Referenced by m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::bucket(), m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::find(), m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::for_all(), m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::insert_with_duplicates(), and m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::insert_without_duplicates().
|
inline |
Definition at line 316 of file RefCountingHashMap.hpp.
References m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::bucket().
|
inline |
Definition at line 195 of file RefCountingHashMap.hpp.
References m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::capacity_.
Referenced by m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::end().
|
inline |
Definition at line 210 of file RefCountingHashMap.hpp.
References m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::begin().
|
inline |
Definition at line 211 of file RefCountingHashMap.hpp.
References m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::end().
|
inline |
Definition at line 333 of file RefCountingHashMap.hpp.
References m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::for_all().
|
inline |
Definition at line 394 of file RefCountingHashMap.hpp.
References m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::dump().
Referenced by m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::dump().
|
inline |
Definition at line 393 of file RefCountingHashMap.hpp.
|
inline |
Definition at line 207 of file RefCountingHashMap.hpp.
References m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::capacity(), and m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::table_.
Referenced by m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::cend(), m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::find(), m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::initialize(), m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::rehash(), and m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::~RefCountingHashMap().
|
inline |
Definition at line 209 of file RefCountingHashMap.hpp.
References m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::capacity(), and m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::table_.
|
inline |
Definition at line 276 of file RefCountingHashMap.hpp.
References m::and, m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::bucket(), m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::end(), m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::eq_, m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::h_, m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::masked(), m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::entry_type::probe_length, m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::the_bucket_iterator< C >::probe_length(), m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::table_, and m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::entry_type::value.
Referenced by m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::find().
|
inline |
Definition at line 307 of file RefCountingHashMap.hpp.
References m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::find().
|
inline |
|
inline |
Definition at line 320 of file RefCountingHashMap.hpp.
References m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::bucket(), m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::eq_, and m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::the_bucket_iterator< C >::has_next().
Referenced by m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::count().
|
inlineprivate |
Definition at line 405 of file RefCountingHashMap.hpp.
References m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::capacity_, m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::end(), and m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::table_.
Referenced by m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::RefCountingHashMap(), and m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::rehash().
|
inline |
Definition at line 213 of file RefCountingHashMap.hpp.
References m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::bucket(), m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::capacity_, m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::h_, M_insist, m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::masked(), m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::entry_type::probe_length, m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::the_bucket_iterator< C >::probe_length(), m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::resize(), m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::size_, m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::table_, m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::entry_type::value, and m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::watermark_high_.
Referenced by m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::rehash().
|
inline |
Definition at line 250 of file RefCountingHashMap.hpp.
References m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::bucket(), m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::capacity_, m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::eq_, m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::h_, m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::masked(), m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::entry_type::probe_length, m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::the_bucket_iterator< C >::probe_length(), m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::resize(), m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::size_, m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::table_, m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::entry_type::value, and m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::watermark_high_.
|
inline |
Definition at line 197 of file RefCountingHashMap.hpp.
References m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::capacity_.
Referenced by m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::masked().
|
inline |
Definition at line 198 of file RefCountingHashMap.hpp.
References m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::mask().
Referenced by m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::bucket(), m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::find(), m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::insert_with_duplicates(), and m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::insert_without_duplicates().
|
inline |
Definition at line 199 of file RefCountingHashMap.hpp.
References m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::max_load_factor_.
Referenced by m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::resize().
|
inline |
|
inline |
Definition at line 363 of file RefCountingHashMap.hpp.
References m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::capacity_, and m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::rehash().
Referenced by m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::rehash(), and m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::resize().
|
inlineprivate |
Rehash all elements.
Definition at line 341 of file RefCountingHashMap.hpp.
References m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::allocate(), m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::capacity_, m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::end(), m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::initialize(), m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::insert_with_duplicates(), M_insist, m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::size_, m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::table_, and m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::watermark_high_.
|
inline |
Definition at line 365 of file RefCountingHashMap.hpp.
References m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::capacity_, M_insist, m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::max_load_factor(), m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::rehash(), m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::size(), m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::watermark_high(), and m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::watermark_high_.
Referenced by m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::insert_with_duplicates(), m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::insert_without_duplicates(), and m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::shrink_to_fit().
|
inline |
Definition at line 376 of file RefCountingHashMap.hpp.
References m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::resize(), and m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::size().
|
inline |
Definition at line 196 of file RefCountingHashMap.hpp.
References m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::size_.
Referenced by m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::resize(), and m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::shrink_to_fit().
|
inline |
Definition at line 204 of file RefCountingHashMap.hpp.
References m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::watermark_high_.
Referenced by m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::resize().
|
friend |
Definition at line 379 of file RefCountingHashMap.hpp.
|
private |
The total number of entries allocated in the table.
Definition at line 160 of file RefCountingHashMap.hpp.
Referenced by m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::capacity(), m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::initialize(), m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::insert_with_duplicates(), m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::insert_without_duplicates(), m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::mask(), m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::max_load_factor(), m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::RefCountingHashMap(), m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::rehash(), m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::resize(), and m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::~RefCountingHashMap().
|
private |
|
private |
Definition at line 154 of file RefCountingHashMap.hpp.
Referenced by m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::bucket(), m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::find(), m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::insert_with_duplicates(), and m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::insert_without_duplicates().
|
private |
The maximum load factor before resizing.
Definition at line 166 of file RefCountingHashMap.hpp.
Referenced by m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::max_load_factor(), and m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::RefCountingHashMap().
|
private |
The number of occupied entries in the table.
Definition at line 162 of file RefCountingHashMap.hpp.
Referenced by m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::insert_with_duplicates(), m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::insert_without_duplicates(), m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::rehash(), and m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::size().
|
private |
A pointer to the beginning of the table.
Definition at line 158 of file RefCountingHashMap.hpp.
Referenced by m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::begin(), m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::end(), m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::find(), m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::initialize(), m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::insert_with_duplicates(), m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::insert_without_duplicates(), m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::RefCountingHashMap(), m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::rehash(), and m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::~RefCountingHashMap().
|
private |
The maximum size before resizing.
Definition at line 164 of file RefCountingHashMap.hpp.
Referenced by m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::insert_with_duplicates(), m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::insert_without_duplicates(), m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::max_load_factor(), m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::RefCountingHashMap(), m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::rehash(), m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::resize(), and m::RefCountingHashMap< Key, Value, Hash, KeyEqual >::watermark_high().