hash_exponential_size_policy Interface (original ) (raw )A size policy whose sequence of sizes form an exponential sequence (typically powers of 2)
Defined in: hash_policy.hpp
Template Parameters
Parameter
Description
Default Value
typename Size_Type
Size type.
size_t
Public Types and Constants General Definitions
Type
Definition
Description
size_type
Size_Type
Size type.
Public Methods
Method
Description
hash_exponential_size_policy (size_type start_size = 8, size_type grow_factor = 2)
Default constructor, or constructor taking astart_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, ...
void swap (hash_exponential_size_policy &other)
Swaps content.
Protected Methods Size methods
Method
Description
size_type get_nearest_larger_size (size_type size) const
Given a size size, returns a size that is larger.
size_type get_nearest_smaller_size (size_type size) const
Given a size size, returns a size that is smaller.