__GNU_PBDS::HASH_STANDARD_RESIZE_POLICY(3)

πŸ“¦
version 16.2.1+r23+gd564253eb6c8 Β· 6 versions
, in arch rolling, centos-stream 10, fedora 43, fedora 44

πŸ’– NAME πŸ’–

__gnu_pbds::hash_standard_resize_policy< Size_Policy, Trigger_Policy, External_Size_Access, Size_Type > β€” a resize policy which delegates operations to size and trigger policies. πŸ’…

okay bestie, this page lives in the Library Functions Manual, section 3, so you know it's the real deal for library calls. 🫢


✨ SYNOPSIS ✨

#include <hash_policy.hpp>

It inherits from __gnu_pbds::hash_exponential_size_policy< Size_Type >, and __gnu_pbds::hash_load_check_resize_trigger< External_Load_Access, Size_Type >. ✨ family tree moment ✨

πŸŽ€ Public Types πŸŽ€

  • enum { external_load_access }
  • enum { external_size_access }
  • typedef Size_Policy size_policy
  • typedef Size_Type size_type
  • typedef Trigger_Policy trigger_policy

πŸ¦‹ Public Member Functions πŸ¦‹

  • hash_standard_resize_policy () β€” Default constructor. no thoughts, just vibes 🌸
  • hash_standard_resize_policy (const Size_Policy &r_size_policy) β€” constructor taking some policies; r_size_policy will be copied by the Size_Policy object of this object.
  • hash_standard_resize_policy (const Size_Policy &r_size_policy, const Trigger_Policy &r_trigger_policy) β€” constructor taking some policies. r_size_policy will be copied by the Size_Policy object of this object. r_trigger_policy will be copied by the Trigger_Policy object of this object.
  • size_type get_actual_size () const β€” Returns the actual size of the container.
  • std::pair< float, float > get_loads () const β€” Returns a pair of the minimal and maximal loads, respectively.
  • Size_Policy & get_size_policy () β€” Access to the Size_Policy object used.
  • const Size_Policy & get_size_policy () const β€” Const access to the Size_Policy object used.
  • Trigger_Policy & get_trigger_policy () β€” Access to the Trigger_Policy object used.
  • const Trigger_Policy & get_trigger_policy () const β€” Access to the Trigger_Policy object used.
  • void resize (size_type suggested_new_size) β€” Resizes the container to suggested_new_size, a suggested size (the actual size will be determined by the Size_Policy object).
  • 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_exponential_size_policy< Size_Type > &other)
  • void swap (hash_load_check_resize_trigger &other)
  • void swap (hash_standard_resize_policy< Size_Policy, Trigger_Policy, External_Size_Access, Size_Type > &other)

πŸ”’ Protected Member Functions πŸ”’

  • size_type get_nearest_larger_size (size_type size) const
  • size_type get_nearest_smaller_size (size_type size) const
  • size_type get_new_size (size_type size, size_type num_used_e) const β€” Queries what the new size should be, when the container is resized naturally. The current __size of the container is size, and the number of used entries within the container is num_used_e.
  • 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_e)
  • 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_e)
  • void notify_resized (size_type new_size)

🌸 DETAILED DESCRIPTION 🌸

template<typename Size_Policy = hash_exponential_size_policy<>, typename Trigger_Policy = hash_load_check_resize_trigger<>, bool External_Size_Access = false, typename Size_Type = std::size_t>
class __gnu_pbds::hash_standard_resize_policy< Size_Policy, Trigger_Policy, External_Size_Access, Size_Type >

"A resize policy which delegates operations to size and trigger policies." it's giving middle management but make it generic πŸ’…


🧚 MEMBER ENUMERATION DOCUMENTATION 🧚

template<bool External_Load_Access = false, typename Size_Type = std::size_t>
anonymous enum [inherited]

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 ✨

πŸŽ€ CONSTRUCTOR & DESTRUCTOR DOCUMENTATION πŸŽ€

hash_standard_resize_policy ()

template<typename Size_Policy, typename Trigger_Policy, bool External_Size_Access, typename Size_Type>
__gnu_pbds::hash_standard_resize_policy< Size_Policy, Trigger_Policy, External_Size_Access, Size_Type >::hash_standard_resize_policy ()

Default constructor. no cap, it just exists 🌸

hash_standard_resize_policy (const Size_Policy & r_size_policy)

template<typename Size_Policy, typename Trigger_Policy, bool External_Size_Access, typename Size_Type>
__gnu_pbds::hash_standard_resize_policy< Size_Policy, Trigger_Policy, External_Size_Access, Size_Type >::hash_standard_resize_policy (const Size_Policy & r_size_policy)

constructor taking some policies β€” r_size_policy will be copied by the Size_Policy object of this object. πŸ’–

hash_standard_resize_policy (const Size_Policy & r_size_policy, const Trigger_Policy & r_trigger_policy)

template<typename Size_Policy, typename Trigger_Policy, bool External_Size_Access, typename Size_Type>
__gnu_pbds::hash_standard_resize_policy< Size_Policy, Trigger_Policy, External_Size_Access, Size_Type >::hash_standard_resize_policy (const Size_Policy & r_size_policy, const Trigger_Policy & r_trigger_policy)

constructor taking some policies. r_size_policy will be copied by the Size_Policy object of this object. r_trigger_policy will be copied by the Trigger_Policy object of this object. two policies, one icon πŸ’…


πŸ”₯ MEMBER FUNCTION DOCUMENTATION πŸ”₯

get_actual_size () const [inline]

template<typename Size_Policy, typename Trigger_Policy, bool External_Size_Access, typename Size_Type>
hash_standard_resize_policy< Size_Policy, Trigger_Policy, External_Size_Access, Size_Type >::size_type
__gnu_pbds::hash_standard_resize_policy< Size_Policy, Trigger_Policy, External_Size_Access, Size_Type >::get_actual_size () const

Returns the actual size of the container. the truth, the whole truth ✨

get_loads () const [inline], [inherited]

template<bool External_Load_Access, typename Size_Type>
std::pair< float, float >
__gnu_pbds::hash_load_check_resize_trigger< External_Load_Access, Size_Type >::get_loads () const

Returns a pair of the minimal and maximal loads, respectively. πŸ“

get_new_size (size_type size, size_type num_used_e) const [protected]

template<typename Size_Policy, typename Trigger_Policy, bool External_Size_Access, typename Size_Type>
hash_standard_resize_policy< Size_Policy, Trigger_Policy, External_Size_Access, Size_Type >::size_type
__gnu_pbds::hash_standard_resize_policy< Size_Policy, Trigger_Policy, External_Size_Access, Size_Type >::get_new_size (size_type size, size_type num_used_e) const

Queries what the new size should be, when the container is resized naturally. The current __size of the container is size, and the number of used entries within the container is num_used_e. protected, so bestie, this one's for the class itself, not for you πŸ™ˆ

get_size_policy ()

template<typename Size_Policy, typename Trigger_Policy, bool External_Size_Access, typename Size_Type>
Size_Policy &
__gnu_pbds::hash_standard_resize_policy< Size_Policy, Trigger_Policy, External_Size_Access, Size_Type >::get_size_policy ()

Access to the Size_Policy object used. πŸ’œ

get_size_policy () const

template<typename Size_Policy, typename Trigger_Policy, bool External_Size_Access, typename Size_Type>
const Size_Policy &
__gnu_pbds::hash_standard_resize_policy< Size_Policy, Trigger_Policy, External_Size_Access, Size_Type >::get_size_policy () const

Const access to the Size_Policy object used. look but don't touch energy ✨

get_trigger_policy ()

template<typename Size_Policy, typename Trigger_Policy, bool External_Size_Access, typename Size_Type>
Trigger_Policy &
__gnu_pbds::hash_standard_resize_policy< Size_Policy, Trigger_Policy, External_Size_Access, Size_Type >::get_trigger_policy ()

Access to the Trigger_Policy object used. 🌈

get_trigger_policy () const

template<typename Size_Policy, typename Trigger_Policy, bool External_Size_Access, typename Size_Type>
const Trigger_Policy &
__gnu_pbds::hash_standard_resize_policy< Size_Policy, Trigger_Policy, External_Size_Access, Size_Type >::get_trigger_policy () const

Access to the Trigger_Policy object used. πŸ‘‘

resize (size_type suggested_new_size)

template<typename Size_Policy, typename Trigger_Policy, bool External_Size_Access, typename Size_Type>
void
__gnu_pbds::hash_standard_resize_policy< Size_Policy, Trigger_Policy, External_Size_Access, Size_Type >::resize (size_type suggested_new_size)

Resizes the container to suggested_new_size, a suggested size (the actual size will be determined by the Size_Policy object). emphasis on suggested, bestie β€” the Size_Policy has final say πŸ’…

set_loads (std::pair< float, float > load_pair) [inherited]

template<bool External_Load_Access, typename Size_Type>
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. 🌸


πŸ’« AUTHOR πŸ’«

Generated automatically by Doxygen for libstdc++ from the source code. not a human, just a very caffeinated robot πŸ€–βœ¨


and that's the whole page, bestie 🫢 this one shipped as part of libstdc++ (the GNU C++ standard library), and it's filed under the __gnu_pbds...Size_Type >(3) manual page. go forth and resize responsibly πŸ’–πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from
  • arch rolling: gcc 16.2.1+r23+gd564253eb6c8-1 Β· GPL-3.0-or-later WITH GCC-exception-3.1 AND GFDL-1.3-or-later
  • centos-stream 10: gcc-toolset-15-libstdc++-docs 15.2.1-8.1.el10 Β· GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel
  • centos-stream 10: gcc-toolset-16-libstdc++-docs 16.2.1-1.3.el10 Β· GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel
  • centos-stream 10: libstdc++-docs 14.4.1-4.el10 Β· GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel
  • fedora 43: libstdc++-docs 15.2.1-2.fc43 Β· GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel
  • fedora 43: libstdc++-docs 15.3.1-1.fc43 Β· GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel
  • fedora 44: libstdc++-docs 16.0.1-0.10.fc44 Β· GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel
  • fedora 44: libstdc++-docs 16.2.1-2.fc44
  • fedora 44: libstdc++-docs 16.2.1-3.fc44 Β· GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms