libstdc++: __gnu_pbds::hash_load_check_resize_trigger< External_Load_Access, Size_Type > Class Template Reference (original) (raw)

#include <[hash_policy.hpp](a01253%5Fsource.html)>

Public Member Functions
hash_load_check_resize_trigger (float load_min=0.125, float load_max=0.5)
std::pair< float, float > get_loads () const
void set_loads (std::pair< float, float > load_pair)
void swap (hash_load_check_resize_trigger &other)
Protected Member Functions
bool is_grow_needed (size_type size, size_type num_entries) const
bool is_resize_needed () const
void notify_cleared ()
void notify_erase_search_collision ()
void notify_erase_search_end ()
void notify_erase_search_start ()
void notify_erased (size_type num_entries)
void notify_externally_resized (size_type new_size)
void notify_find_search_collision ()
void notify_find_search_end ()
void notify_find_search_start ()
void notify_insert_search_collision ()
void notify_insert_search_end ()
void notify_insert_search_start ()
void notify_inserted (size_type num_entries)
void notify_resized (size_type new_size)

template<bool External_Load_Access = false, typename Size_Type = std::size_t>
class __gnu_pbds::hash_load_check_resize_trigger< External_Load_Access, Size_Type >

A resize trigger policy based on a load check. It keeps the load factor between some load factors load_min and load_max.

Definition at line 175 of file hash_policy.hpp.

template<bool External_Load_Access = false, typename Size_Type = std::size_t>

anonymous enum

template<bool External_Load_Access = false, typename Size_Type = std::size_t>

Enumerator
external_load_access Specifies whether the load factor can be accessed externally. The two options have different trade-offs in terms of flexibility, genericity, and encapsulation.

Definition at line 180 of file hash_policy.hpp.

hash_load_check_resize_trigger()

template<bool External_Load_Access = false, typename Size_Type = std::size_t>

__gnu_pbds::hash_load_check_resize_trigger< External_Load_Access, Size_Type >::hash_load_check_resize_trigger ( float load_min = 0.125,
float load_max = 0.5
)

Default constructor, or constructor taking load_min and load_max load factors between which this policy will keep the actual load.

get_loads()

template<bool External_Load_Access = false, typename Size_Type = std::size_t>

Returns a pair of the minimal and maximal loads, respectively.

notify_cleared()

template<bool External_Load_Access = false, typename Size_Type = std::size_t>

Notifies the table was cleared.

notify_inserted()

template<bool External_Load_Access = false, typename Size_Type = std::size_t>

Notifies an element was inserted. The total number of entries in the table is num_entries.

notify_resized()

template<bool External_Load_Access = false, typename Size_Type = std::size_t>

Notifies the table was resized as a result of this object's signifying that a resize is needed.

set_loads()

Sets the loads through a pair of the minimal and maximal loads, respectively.


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