__GNU_PBDS::HASH_LOAD_CHECK_RESIZE_TRIGGER(3cxx)
π NAME π
okay so bestie, this page is the manual for __gnu_pbds::hash_load_check_resize_trigger< External_Load_Access, Size_Type > β and the manual name on the header is __gnu_pbds::ha...ss, Size_Type >(3cxx) (yes, the terminal clipped it, it's giving "long title problems" π« ).
It's a resize trigger policy based on a load check. It keeps the load factor between some load factors load_min and load_max. That's the whole vibe β it watches the load and says "girl, we need to resize" when you cross the line. β¨
π¦ 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 >.
π Public Types
enum { external_load_access }typedef Size_Type size_type
πΈ Public Member Functions
hash_load_check_resize_trigger (float load_min=0.125, float load_max=0.5)β Default constructor, or constructor takingload_minandload_maxload factors between which this policy will keep the actual load. slay, you get defaults and control π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)β swaps withother(no extra description in the source, she's mysterious like that π)
π Protected Member Functions
bool is_grow_needed (size_type size, size_type num_entries) constbool is_resize_needed () constvoid 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 isnum_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.
π§ Detailed Description π§
template<bool External_Load_Access = false, typename Size_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." β literally the whole personality in one sentence, no cap π
π 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. (so it's a real "pick your fighter" situation βοΈ)
β Constructor & Destructor Documentation β
template<bool External_Load_Access = false, typename Size_Type =
std::size_t>
__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. defaults are 0.125 and 0.5, and yes those are exact, don't come for me π«Ά
π Member Function Documentation π
template<bool External_Load_Access = false, typename Size_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<bool External_Load_Access = false, typename Size_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<bool External_Load_Access = false, typename Size_Type =
std::size_t>
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. she's keeping count, always π₯
template<bool External_Load_Access = false, typename Size_Type =
std::size_t>
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. main character energy: she said "resize" and the resize happened π
template<bool External_Load_Access = false, typename Size_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. order matters, bestie β min first, max second π
πΈ Author πΈ
Generated automatically by Doxygen for libstdc++ from the source code. (so nobody hand-wrote this, it's literally Doxygen doing its thing π€β¨)
ngl that's the whole page β every flag, every function signature, every protected notifier, all of it. nothing dropped, nothing invented. iykyk π
and that's a wrap! this page came to you from the libstdc++ manual, auto-generated by Doxygen from the source code, and the footer shouted libstd__gnu_pbds::ha...ss, Size_Type >(3cxx) at us on the way out β bye bestie, 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