Grow the map by GrowthFactor::num/GrowthFactorden and use a modulo to map a hash to a bucket. Slower but it can be usefull if you want a slower growth.
Definition at line 150 of file hopscotch_hash.h.
#include <hopscotch_hash.h>
Public Member Functions | |
mod_growth_policy (std::size_t &min_bucket_count_in_out) | |
std::size_t | bucket_for_hash (std::size_t hash) const |
std::size_t | next_bucket_count () const |
std::size_t | max_bucket_count () const |
Private Attributes | |
std::size_t | m_bucket_count |
Static Private Attributes | |
static const std::size_t | MIN_BUCKETS_SIZE = 2 |
static constexpr double | REHASH_SIZE_MULTIPLICATION_FACTOR = 1.0*GrowthFactor::num/GrowthFactor::den |
static const std::size_t | MAX_BUCKET_COUNT |
|
inline |
Definition at line 152 of file hopscotch_hash.h.
|
inline |
Definition at line 164 of file hopscotch_hash.h.
|
inline |
Definition at line 187 of file hopscotch_hash.h.
|
inline |
Definition at line 169 of file hopscotch_hash.h.
|
private |
Definition at line 201 of file hopscotch_hash.h.
|
staticprivate |
Definition at line 194 of file hopscotch_hash.h.
|
staticprivate |
Definition at line 192 of file hopscotch_hash.h.
|
staticconstexprprivate |
Definition at line 193 of file hopscotch_hash.h.