OpenFPM_pdata  4.1.0
Project that contain the implementation of distributed structures
 
Loading...
Searching...
No Matches
tsl::prime_growth_policy Class Reference

Detailed Description

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>

Public Member Functions

 prime_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 Member Functions

std::size_t bucket_for_hash_iprime (std::size_t hash, unsigned int iprime) const
 

Private Attributes

unsigned int m_iprime
 

Constructor & Destructor Documentation

◆ prime_growth_policy()

tsl::prime_growth_policy::prime_growth_policy ( std::size_t &  min_bucket_count_in_out)
inline

Definition at line 235 of file hopscotch_hash.h.

Member Function Documentation

◆ bucket_for_hash()

std::size_t tsl::prime_growth_policy::bucket_for_hash ( std::size_t  hash) const
inline

Definition at line 246 of file hopscotch_hash.h.

◆ bucket_for_hash_iprime()

std::size_t tsl::prime_growth_policy::bucket_for_hash_iprime ( std::size_t  hash,
unsigned int  iprime 
) const
inlineprivate

Definition at line 263 of file hopscotch_hash.h.

◆ max_bucket_count()

std::size_t tsl::prime_growth_policy::max_bucket_count ( ) const
inline

Definition at line 258 of file hopscotch_hash.h.

◆ next_bucket_count()

std::size_t tsl::prime_growth_policy::next_bucket_count ( ) const
inline

Definition at line 250 of file hopscotch_hash.h.

Field Documentation

◆ m_iprime

unsigned int tsl::prime_growth_policy::m_iprime
private

Definition at line 269 of file hopscotch_hash.h.


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