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

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

Public Member Functions
cc_hash_max_collision_check_resize_trigger (float load=0.5)
float get_load () const
void set_load (float load)
void swap (cc_hash_max_collision_check_resize_trigger< External_Load_Access, Size_Type > &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::cc_hash_max_collision_check_resize_trigger< External_Load_Access, Size_Type >

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.

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 298 of file hash_policy.hpp.

cc_hash_max_collision_check_resize_trigger()

Default constructor, or constructor taking load, a __load factor which it will attempt to maintain.

get_load()

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

Returns the current load.

is_grow_needed()

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

Queries whether a grow is needed. This method is called only if this object indicated is needed.

is_resize_needed()

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

Queries whether a resize is needed.

notify_cleared()

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

Notifies the table was cleared.

notify_erase_search_collision()

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

Notifies a search encountered a collision.

notify_erase_search_end()

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

Notifies a search ended.

notify_erase_search_start()

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

Notifies an erase search started.

notify_erased()

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

Notifies an element was erased.

notify_externally_resized()

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

Notifies the table was resized externally.

notify_find_search_collision()

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

Notifies a search encountered a collision.

notify_find_search_end()

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

Notifies a search ended.

notify_find_search_start()

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

Notifies a find search started.

notify_insert_search_collision()

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

Notifies a search encountered a collision.

notify_insert_search_end()

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

Notifies a search ended.

notify_insert_search_start()

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

Notifies an insert search started.

notify_inserted()

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

Notifies an element was inserted.

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_load()

Sets the load; does not resize the container.


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