__gnu_pbds::hash_exponential_size_policy< Size_Type > Class Template Reference

`#include <hash_policy.hpp>`

Inheritance diagram for __gnu_pbds::hash_exponential_size_policy< Size_Type >:
[legend]

## Public Types

typedef Size_Type | size_type

## Public Member Functions

| hash_exponential_size_policy (size_type start_size=8, size_type grow_factor=2)
void | swap (hash_exponential_size_policy< Size_Type > &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

template<typename Size_Type = std::size_t>
class __gnu_pbds::hash_exponential_size_policy< Size_Type >

A size policy whose sequence of sizes form an exponential sequence (typically powers of 2.

Definition at line 413 of file hash_policy.hpp.

## Member Typedef Documentation

## size_type

template<typename Size_Type = std::size_t>

typedef Size_Type __gnu_pbds::hash_exponential_size_policy< Size_Type >::size_type

Definition at line 416 of file hash_policy.hpp.

## Constructor & Destructor Documentation

## hash_exponential_size_policy()

template<typename Size_Type>

__gnu_pbds::hash_exponential_size_policy< Size_Type >::hash_exponential_size_policy | ( | size_type | start_size = 8,
|  | size_type | grow_factor = 2 )

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

Definition at line 45 of file hash_policy.hpp.

## Member Function Documentation

## get_nearest_larger_size()

template<typename Size_Type>

hash_exponential_size_policy< Size_Type >::size_type __gnu_pbds::hash_exponential_size_policy< Size_Type >::get_nearest_larger_size | ( | size_type | size | ) | const

protected

Definition at line 62 of file hash_policy.hpp.

## get_nearest_smaller_size()

template<typename Size_Type>

hash_exponential_size_policy< Size_Type >::size_type __gnu_pbds::hash_exponential_size_policy< Size_Type >::get_nearest_smaller_size | ( | size_type | size | ) | const

protected

Definition at line 78 of file hash_policy.hpp.

## swap()

template<typename Size_Type>

void __gnu_pbds::hash_exponential_size_policy< Size_Type >::swap | ( | hash_exponential_size_policy< Size_Type > & | other | ) |

Definition at line 53 of file hash_policy.hpp.

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

- hash_policy.hpp