libstdc++
|
Inherits hash_load_check_resize_trigger_size_base< Size_Type, External_Load_Access >.
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.
anonymous enum |
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.
__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.
Definition at line 48 of file hash_policy.hpp.
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.
Definition at line 237 of file hash_policy.hpp.
void __gnu_pbds::hash_load_check_resize_trigger< External_Load_Access, Size_Type >::notify_cleared | ( | ) | [protected] |
Notifies the table was cleared.
Definition at line 207 of file hash_policy.hpp.
void __gnu_pbds::hash_load_check_resize_trigger< External_Load_Access, Size_Type >::notify_inserted | ( | size_type | num_entries | ) | [inline, protected] |
Notifies an element was inserted. The total number of entries in the table is num_entries.
Definition at line 110 of file hash_policy.hpp.
void __gnu_pbds::hash_load_check_resize_trigger< External_Load_Access, Size_Type >::notify_resized | ( | size_type | new_size | ) | [protected] |
Notifies the table was resized as a result of this object's signifying that a resize is needed.
Definition at line 152 of file hash_policy.hpp.
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.
Definition at line 246 of file hash_policy.hpp.