libstdc++
__gnu_pbds::hash_prime_size_policy Class Reference

#include <hash_policy.hpp>

Public Types

typedef std::size_t size_type
 

Public Member Functions

 hash_prime_size_policy (size_type start_size=8)
 
void swap (hash_prime_size_policy &other)
 

Protected Member Functions

size_type get_nearest_larger_size (size_type size) const
 
size_type get_nearest_smaller_size (size_type size) const
 

Detailed Description

A size policy whose sequence of sizes form a nearly-exponential sequence of primes.

Definition at line 450 of file hash_policy.hpp.

Member Typedef Documentation

◆ size_type

Size type.

Definition at line 454 of file hash_policy.hpp.

Constructor & Destructor Documentation

◆ hash_prime_size_policy()

__gnu_pbds::hash_prime_size_policy::hash_prime_size_policy ( size_type start_size = 8)
inline

Default constructor, or onstructor taking a start_size The policy will use the sequence of sizes approximately start_size, start_size* 2, start_size* 2^2, ...

Definition at line 140 of file hash_policy.hpp.

Member Function Documentation

◆ get_nearest_larger_size()

hash_prime_size_policy::size_type __gnu_pbds::hash_prime_size_policy::get_nearest_larger_size ( size_type size) const
inlineprotected

Definition at line 152 of file hash_policy.hpp.

◆ get_nearest_smaller_size()

hash_prime_size_policy::size_type __gnu_pbds::hash_prime_size_policy::get_nearest_smaller_size ( size_type size) const
inlineprotected

Definition at line 165 of file hash_policy.hpp.

◆ swap()

void __gnu_pbds::hash_prime_size_policy::swap ( hash_prime_size_policy & other)
inline

Definition at line 146 of file hash_policy.hpp.


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