Grow the map by using prime numbers as size. Slower than tsl::power_of_two_growth_policy in general but will probably distribute the values around better in the buckets with a poor hash function.
Definition at line 233 of file hopscotch_hash.h.
#include <hopscotch_hash.h>
◆ prime_growth_policy()
tsl::prime_growth_policy::prime_growth_policy |
( |
std::size_t & |
min_bucket_count_in_out | ) |
|
|
inline |
◆ bucket_for_hash()
std::size_t tsl::prime_growth_policy::bucket_for_hash |
( |
std::size_t |
hash | ) |
const |
|
inline |
◆ bucket_for_hash_iprime()
std::size_t tsl::prime_growth_policy::bucket_for_hash_iprime |
( |
std::size_t |
hash, |
|
|
unsigned int |
iprime |
|
) |
| const |
|
inlineprivate |
◆ max_bucket_count()
std::size_t tsl::prime_growth_policy::max_bucket_count |
( |
| ) |
const |
|
inline |
◆ next_bucket_count()
std::size_t tsl::prime_growth_policy::next_bucket_count |
( |
| ) |
const |
|
inline |
◆ m_iprime
unsigned int tsl::prime_growth_policy::m_iprime |
|
private |
The documentation for this class was generated from the following file: