Public Member Functions | Private Attributes | Static Private Attributes | List of all members
tsl::rh::mod_growth_policy< GrowthFactor > Class Template Reference

#include <robin_growth_policy.h>

Public Member Functions

std::size_t bucket_for_hash (std::size_t hash) const noexcept
 
void clear () noexcept
 
std::size_t max_bucket_count () const
 
 mod_growth_policy (std::size_t &min_bucket_count_in_out)
 
std::size_t next_bucket_count () const
 

Private Attributes

std::size_t m_mod
 

Static Private Attributes

static const std::size_t MAX_BUCKET_COUNT
 
static constexpr double REHASH_SIZE_MULTIPLICATION_FACTOR
 

Detailed Description

template<class GrowthFactor = std::ratio<3, 2>>
class tsl::rh::mod_growth_policy< GrowthFactor >

Grow the hash table by GrowthFactor::num / GrowthFactor::den and use a modulo to map a hash to a bucket. Slower but it can be useful if you want a slower growth.

Definition at line 190 of file robin_growth_policy.h.

Constructor & Destructor Documentation

◆ mod_growth_policy()

template<class GrowthFactor = std::ratio<3, 2>>
tsl::rh::mod_growth_policy< GrowthFactor >::mod_growth_policy ( std::size_t &  min_bucket_count_in_out)
inlineexplicit

Definition at line 192 of file robin_growth_policy.h.

Member Function Documentation

◆ bucket_for_hash()

template<class GrowthFactor = std::ratio<3, 2>>
std::size_t tsl::rh::mod_growth_policy< GrowthFactor >::bucket_for_hash ( std::size_t  hash) const
inlinenoexcept

Definition at line 205 of file robin_growth_policy.h.

◆ clear()

template<class GrowthFactor = std::ratio<3, 2>>
void tsl::rh::mod_growth_policy< GrowthFactor >::clear ( )
inlinenoexcept

Definition at line 231 of file robin_growth_policy.h.

◆ max_bucket_count()

template<class GrowthFactor = std::ratio<3, 2>>
std::size_t tsl::rh::mod_growth_policy< GrowthFactor >::max_bucket_count ( ) const
inline

Definition at line 229 of file robin_growth_policy.h.

◆ next_bucket_count()

template<class GrowthFactor = std::ratio<3, 2>>
std::size_t tsl::rh::mod_growth_policy< GrowthFactor >::next_bucket_count ( ) const
inline

Definition at line 209 of file robin_growth_policy.h.

Member Data Documentation

◆ m_mod

template<class GrowthFactor = std::ratio<3, 2>>
std::size_t tsl::rh::mod_growth_policy< GrowthFactor >::m_mod
private

Definition at line 241 of file robin_growth_policy.h.

◆ MAX_BUCKET_COUNT

template<class GrowthFactor = std::ratio<3, 2>>
const std::size_t tsl::rh::mod_growth_policy< GrowthFactor >::MAX_BUCKET_COUNT
staticprivate
Initial value:
=
std::size_t(double(std::numeric_limits<std::size_t>::max() /

Definition at line 236 of file robin_growth_policy.h.

◆ REHASH_SIZE_MULTIPLICATION_FACTOR

template<class GrowthFactor = std::ratio<3, 2>>
constexpr double tsl::rh::mod_growth_policy< GrowthFactor >::REHASH_SIZE_MULTIPLICATION_FACTOR
staticconstexprprivate
Initial value:
=
1.0 * GrowthFactor::num / GrowthFactor::den

Definition at line 234 of file robin_growth_policy.h.


The documentation for this class was generated from the following file:
tsl::rh::mod_growth_policy::REHASH_SIZE_MULTIPLICATION_FACTOR
static constexpr double REHASH_SIZE_MULTIPLICATION_FACTOR
Definition: robin_growth_policy.h:234


mp2p_icp
Author(s):
autogenerated on Fri Dec 20 2024 03:46:01