__GNU_PBDS::CC_HASH_MAX_COLLISION_CHECK_RESIZE_TRIGGER(3cxx)
π
__gnu_pbds::cc_hash_max_collision_check_resize_trigger< External_Load_Access, Size_Type > π
okay so bestie, welcome to the 3cxx manual page for one of libstdc++'s fancy little hash-policy gremlins β¨ this one is a resize trigger policy β basically the thing that taps the table on the shoulder and is like "girlβ¦ we're getting crowded, time to grow" π«Ά
πΈ NAME πΈ
__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. no cap, that's literally its whole job π
β¨ SYNOPSIS β¨
#include <hash_policy.hpp>
π Public Types π
enum { external_load_access }typedef Size_Type size_type
π Public Member Functions π
cc_hash_max_collision_check_resize_trigger (float load=0.5)β default constructor, or constructor taking load, a__loadfactor which it will attempt to maintain.float get_load () constβ returns the current load.void set_load (float load)β sets the load; does not resize the container (she's just taking notes, not redecorating π«Ά).void swap (cc_hash_max_collision_check_resize_trigger< External_Load_Access, Size_Type > &other)β swaps with other.
π¦ Protected Member Functions π¦
bool is_grow_needed (size_type size, size_type num_entries) constβ queries whether a grow is needed. This method is called only if this object indicated is needed.bool is_resize_needed () constβ queries whether a resize is needed.void notify_cleared ()β notifies the table was cleared.void notify_erase_search_collision ()β notifies a search encountered a collision.void notify_erase_search_end ()β notifies a search ended.void notify_erase_search_start ()β notifies an erase search started.void notify_erased (size_type num_entries)β notifies an element was erased.void notify_externally_resized (size_type new_size)β notifies the table was resized externally.void notify_find_search_collision ()β notifies a search encountered a collision.void notify_find_search_end ()β notifies a search ended.void notify_find_search_start ()β notifies a find search started.void notify_insert_search_collision ()β notifies a search encountered a collision.void notify_insert_search_end ()β notifies a search ended.void notify_insert_search_start ()β notifies an insert search started.void notify_inserted (size_type num_entries)β notifies an element was inserted.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.
π Detailed Description π
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." π that's the quote, that's the vibe, that's the whole personality.
π Member Enumeration Documentation π
template<bool External_Load_Access = false, typename Size_Type =
std::size_t> anonymous enum
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. iykyk, it's giving "choose your fighter" energy π
π₯ Constructor & Destructor Documentation π₯
template<bool External_Load_Access = false, typename Size_Type =
std::size_t>
__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. yes bestie, it's got a default and it's got range π
π Member Function Documentation π
template<bool External_Load_Access = false, typename Size_Type =
std::size_t> float
__gnu_pbds::cc_hash_max_collision_check_resize_trigger<
External_Load_Access, Size_Type >::get_load () const [inline]
Returns the current load. that's it, that's the function π«Ά
template<bool External_Load_Access = false, typename Size_Type =
std::size_t> 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. (yes, that sentence is a little circular, but it's canon π )
template<bool External_Load_Access = false, typename Size_Type =
std::size_t> 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.
template<bool External_Load_Access = false, typename Size_Type =
std::size_t> void
__gnu_pbds::cc_hash_max_collision_check_resize_trigger<
External_Load_Access, Size_Type >::notify_cleared () [protected]
Notifies the table was cleared.
template<bool External_Load_Access = false, typename Size_Type =
std::size_t> 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.
template<bool External_Load_Access = false, typename Size_Type =
std::size_t> 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.
template<bool External_Load_Access = false, typename Size_Type =
std::size_t> 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.
template<bool External_Load_Access = false, typename Size_Type =
std::size_t> 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.
template<bool External_Load_Access = false, typename Size_Type =
std::size_t> 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.
template<bool External_Load_Access = false, typename Size_Type =
std::size_t> 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.
template<bool External_Load_Access = false, typename Size_Type =
std::size_t> 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.
template<bool External_Load_Access = false, typename Size_Type =
std::size_t> 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.
template<bool External_Load_Access = false, typename Size_Type =
std::size_t> 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.
template<bool External_Load_Access = false, typename Size_Type =
std::size_t> 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.
template<bool External_Load_Access = false, typename Size_Type =
std::size_t> 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.
template<bool External_Load_Access = false, typename Size_Type =
std::size_t> 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.
template<bool External_Load_Access = false, typename Size_Type =
std::size_t> 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.
template<bool External_Load_Access = false, typename Size_Type =
std::size_t> 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. again β she is not touching the container, she's just setting a number, periodt π
π Author π
Generated automatically by Doxygen for libstdc++ from the source code. so likeβ¦ nobody hand-wrote this and honestly you can tell π
and that's the whole page bestie!! every single flag, signature,[inline],[protected], template default andstd::size_tis safely in there β nothing dropped, nothing invented, we ate and left no crumbs π
π signing off from the 3cxx manual, brought to you by libstdc++ β mwah, go resize something responsibly ππ¦
π¦ where this page comes from
- debian trixie: libstdc++-12-doc 12.4.0-5
- debian trixie: libstdc++-13-doc 13.3.0-16
- debian trixie: libstdc++-14-doc 14.2.0-19
- ubuntu noble: libstdc++-10-doc 10.5.0-4ubuntu2
- ubuntu noble: libstdc++-10-doc 10.5.0-4ubuntu2.1
- ubuntu noble: libstdc++-11-doc 11.4.0-9ubuntu1
- ubuntu noble: libstdc++-11-doc 11.5.0-1ubuntu1~24.04.1
- ubuntu noble: libstdc++-12-doc 12.3.0-17ubuntu1
- ubuntu noble: libstdc++-12-doc 12.4.0-2ubuntu1~24.04.1
- ubuntu noble: libstdc++-13-doc 13.2.0-23ubuntu4
- ubuntu noble: libstdc++-13-doc 13.3.0-6ubuntu2~24.04.1
- ubuntu noble: libstdc++-14-doc 14-20240412-0ubuntu1
- ubuntu noble: libstdc++-14-doc 14.2.0-4ubuntu2~24.04.1
- ubuntu questing: libstdc++-11-doc 11.5.0-7ubuntu1
- ubuntu questing: libstdc++-11-doc 11.5.0-7ubuntu1.1
- ubuntu questing: libstdc++-12-doc 12.5.0-6ubuntu1
- ubuntu questing: libstdc++-13-doc 13.4.0-4ubuntu1
- ubuntu questing: libstdc++-14-doc 14.3.0-8ubuntu1
- ubuntu questing: libstdc++-15-doc 15.2.0-4ubuntu4
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms