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_exponential_size_policy< Size_Type > Class Template Reference

#include <ext/pb_ds/hash_policy.hpp>

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 (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
 
size_type m_grow_factor
 

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.

Member Typedef Documentation

template<typename Size_Type = std::size_t>
typedef Size_Type __gnu_pbds::hash_exponential_size_policy< Size_Type >::size_type

Constructor & Destructor Documentation

template<typename Size_Type = std::size_t>
__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, ...

Member Function Documentation

template<typename Size_Type = std::size_t>
size_type __gnu_pbds::hash_exponential_size_policy< Size_Type >::get_nearest_larger_size ( size_type  size) const
protected
template<typename Size_Type = std::size_t>
size_type __gnu_pbds::hash_exponential_size_policy< Size_Type >::get_nearest_smaller_size ( size_type  size) const
protected
template<typename Size_Type = std::size_t>
void __gnu_pbds::hash_exponential_size_policy< Size_Type >::swap ( PB_DS_CLASS_C_DEC other)

Member Data Documentation

template<typename Size_Type = std::size_t>
size_type __gnu_pbds::hash_exponential_size_policy< Size_Type >::m_grow_factor
private
template<typename Size_Type = std::size_t>
size_type __gnu_pbds::hash_exponential_size_policy< Size_Type >::m_start_size
private

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