STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Protected Member Functions | Private Attributes | List of all members
__gnu_pbds::hash_prime_size_policy Class Reference

#include <ext/pb_ds/hash_policy.hpp>

Public Types

typedef std::size_t size_type
 Size type. More...
 

Public Member Functions

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

Protected Member Functions

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

Private Attributes

size_type m_start_size
 

Detailed Description

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

Member Typedef Documentation

Size type.

Constructor & Destructor Documentation

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

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, ...

Member Function Documentation

size_type __gnu_pbds::hash_prime_size_policy::get_nearest_larger_size ( size_type  size) const
protected
size_type __gnu_pbds::hash_prime_size_policy::get_nearest_smaller_size ( size_type  size) const
protected
void __gnu_pbds::hash_prime_size_policy::swap ( PB_DS_CLASS_C_DEC other)
inline

Member Data Documentation

size_type __gnu_pbds::hash_prime_size_policy::m_start_size
private

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