libstdc++
|
A resize trigger policy based on collision checks. It keeps the simulated load factor lower than some given load factor. More...
A resize trigger policy based on collision checks. It keeps the simulated load factor lower than some given load factor.
Definition at line 293 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 298 of file hash_policy.hpp.
__gnu_pbds::cc_hash_max_collision_check_resize_trigger< External_Load_Access, Size_Type >::cc_hash_max_collision_check_resize_trigger | ( | float | load = 0.5 | ) |
Default constructor, or constructor taking load, a __load factor which it will attempt to maintain.
float __gnu_pbds::cc_hash_max_collision_check_resize_trigger< External_Load_Access, Size_Type >::get_load | ( | ) | const [inline] |
Returns the current load.
bool __gnu_pbds::cc_hash_max_collision_check_resize_trigger< External_Load_Access, Size_Type >::is_grow_needed | ( | size_type | size, |
size_type | num_entries | ||
) | const [inline, protected] |
Queries whether a grow is needed. This method is called only if this object indicated is needed.
bool __gnu_pbds::cc_hash_max_collision_check_resize_trigger< External_Load_Access, Size_Type >::is_resize_needed | ( | ) | const [inline, protected] |
Queries whether a resize is needed.
void __gnu_pbds::cc_hash_max_collision_check_resize_trigger< External_Load_Access, Size_Type >::notify_cleared | ( | ) | [protected] |
Notifies the table was cleared.
void __gnu_pbds::cc_hash_max_collision_check_resize_trigger< External_Load_Access, Size_Type >::notify_erase_search_collision | ( | ) | [inline, protected] |
Notifies a search encountered a collision.
void __gnu_pbds::cc_hash_max_collision_check_resize_trigger< External_Load_Access, Size_Type >::notify_erase_search_end | ( | ) | [inline, protected] |
Notifies a search ended.
void __gnu_pbds::cc_hash_max_collision_check_resize_trigger< External_Load_Access, Size_Type >::notify_erase_search_start | ( | ) | [inline, protected] |
Notifies an erase search started.
void __gnu_pbds::cc_hash_max_collision_check_resize_trigger< External_Load_Access, Size_Type >::notify_erased | ( | size_type | num_entries | ) | [inline, protected] |
Notifies an element was erased.
void __gnu_pbds::cc_hash_max_collision_check_resize_trigger< External_Load_Access, Size_Type >::notify_externally_resized | ( | size_type | new_size | ) | [protected] |
Notifies the table was resized externally.
void __gnu_pbds::cc_hash_max_collision_check_resize_trigger< External_Load_Access, Size_Type >::notify_find_search_collision | ( | ) | [inline, protected] |
Notifies a search encountered a collision.
void __gnu_pbds::cc_hash_max_collision_check_resize_trigger< External_Load_Access, Size_Type >::notify_find_search_end | ( | ) | [inline, protected] |
Notifies a search ended.
void __gnu_pbds::cc_hash_max_collision_check_resize_trigger< External_Load_Access, Size_Type >::notify_find_search_start | ( | ) | [inline, protected] |
Notifies a find search started.
void __gnu_pbds::cc_hash_max_collision_check_resize_trigger< External_Load_Access, Size_Type >::notify_insert_search_collision | ( | ) | [inline, protected] |
Notifies a search encountered a collision.
void __gnu_pbds::cc_hash_max_collision_check_resize_trigger< External_Load_Access, Size_Type >::notify_insert_search_end | ( | ) | [inline, protected] |
Notifies a search ended.
void __gnu_pbds::cc_hash_max_collision_check_resize_trigger< External_Load_Access, Size_Type >::notify_insert_search_start | ( | ) | [inline, protected] |
Notifies an insert search started.
void __gnu_pbds::cc_hash_max_collision_check_resize_trigger< External_Load_Access, Size_Type >::notify_inserted | ( | size_type | num_entries | ) | [inline, protected] |
Notifies an element was inserted.
void __gnu_pbds::cc_hash_max_collision_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.
void __gnu_pbds::cc_hash_max_collision_check_resize_trigger< External_Load_Access, Size_Type >::set_load | ( | float | load | ) |
Sets the load; does not resize the container.