__gnu_pbds::hash_load_check_resize_trigger.3cxx
Contents
Constructor & Destructor Documentation
template<boolExternal_Load_Access=false,typenameSize_Type=std::size_t>__gnu_pbds::hash_load_check_resize_trigger<External_Load_Access,Size_Type>::hash_load_check_resize_trigger(floatload_min=0.125,floatload_max=0.5)
Default constructor, or constructor taking load_min and load_max load factors between which this policy
will keep the actual load.
Detailed Description
template<boolExternal_Load_Access=false,typenameSize_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.
Member Enumeration Documentation
template<boolExternal_Load_Access=false,typenameSize_Type=std::size_t>anonymousenumEnumeratorexternal_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.
Member Function Documentation
template<boolExternal_Load_Access=false,typenameSize_Type=std::size_t>std::pair<float,float>__gnu_pbds::hash_load_check_resize_trigger<External_Load_Access,Size_Type>::get_loads()const[inline]
Returns a pair of the minimal and maximal loads, respectively.
template<boolExternal_Load_Access=false,typenameSize_Type=std::size_t>void__gnu_pbds::hash_load_check_resize_trigger<External_Load_Access,Size_Type>::notify_cleared()[protected]
Notifies the table was cleared.
template<boolExternal_Load_Access=false,typenameSize_Type=std::size_t>void__gnu_pbds::hash_load_check_resize_trigger<External_Load_Access,Size_Type>::notify_inserted(size_typenum_entries)[inline],[protected]
Notifies an element was inserted. The total number of entries in the table is num_entries.
template<boolExternal_Load_Access=false,typenameSize_Type=std::size_t>void__gnu_pbds::hash_load_check_resize_trigger<External_Load_Access,Size_Type>::notify_resized(size_typenew_size)[protected]
Notifies the table was resized as a result of this object's signifying that a resize is needed.
template<boolExternal_Load_Access=false,typenameSize_Type=std::size_t>void__gnu_pbds::hash_load_check_resize_trigger<External_Load_Access,Size_Type>::set_loads(std::pair<float,float>load_pair)
Sets the loads through a pair of the minimal and maximal loads, respectively.
Name
__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.
Synopsis
#include <hash_policy.hpp>
Inherits __gnu_pbds::detail::hash_load_check_resize_trigger_size_base<Size_Type,Hold_Size>.
Inherited by __gnu_pbds::hash_standard_resize_policy<Size_Policy,Trigger_Policy,External_Size_Access,Size_Type>.
PublicTypes
enum { external_load_access }
typedef Size_Type size_typePublicMemberFunctionshash_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.
std::pair< float, float > get_loads () const
Returns a pair of the minimal and maximal loads, respectively.
void set_loads (std::pair< float, float > load_pair)
Sets the loads through a pair of the minimal and maximal loads, respectively.
void swap (hash_load_check_resize_trigger &other)
ProtectedMemberFunctions
bool is_grow_needed (size_type size, size_type num_entries) const
bool is_resize_needed () const
void notify_cleared ()
Notifies the table was 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)
Notifies an element was inserted. The total number of entries in the table is num_entries.
void notify_resized (size_type new_size)
Notifies the table was resized as a result of this object's signifying that a resize is needed.
