__GNU_PBDS::DETAIL::BINOMIAL_HEAP(3)

πŸ“¦
version 16.2.1+r23+gd564253eb6c8 Β· 7 versions
, in arch rolling, fedora 44

πŸ’– NAME πŸ’–

__gnu_pbds::detail::binomial_heap< Value_Type, Cmp_Fn, _Alloc > β€” bestie, this is a page straight out of the Library Functions Manual, and we are gonna get into it. πŸ¦‹


✨ SYNOPSIS ✨

#include <binomial_heap_.hpp>

okay so the tea is that this class inherits __gnu_pbds::detail::binomial_heap_base< Value_Type, Cmp_Fn, _Alloc >. That's the whole lineage, no cap. πŸ‘‘


🌸 Public Types 🌸

the glow-up starter pack β€” all the type aliases this class hands out to the public:

  • typedef base_type::allocator_type allocator_type β€” the allocator type, courtesy of base_type
  • typedef base_type::cmp_fn cmp_fn β€” the comparator type, straight from base_type
  • typedef base_type::const_iterator const_iterator β€” const iterator, base_type's version
  • typedef base_type::const_pointer const_pointer β€” const pointer, again from base_type
  • typedef base_type::const_reference const_reference β€” const reference, base_type coded it
  • typedef _Alloc::difference_type difference_type β€” difference type, and this one comes from _Alloc
  • typedef base_type::iterator iterator β€” the regular iterator, base_type flavored
  • typedef base_type::point_const_iterator point_const_iterator β€” point const iterator, from base_type
  • typedef base_type::point_iterator point_iterator β€” point iterator, base_type said so
  • typedef base_type::pointer pointer β€” pointer, base_type edition
  • typedef base_type::reference reference β€” reference, base_type coded
  • typedef _Alloc::size_type size_type β€” size type, and this one's from _Alloc
  • typedef Value_Type value_type β€” value type, which is literally just Value_Type πŸ’…

πŸŽ€ Public Member Functions πŸŽ€

  • binomial_heap (const binomial_heap &) β€” a constructor that takes a const binomial_heap &. copy-paste era
  • binomial_heap (const Cmp_Fn &) β€” a constructor that takes a const Cmp_Fn &
  • iterator begin () β€” takes nothing, gives you back an iterator
  • void clear () β€” no args, no return, just void
  • bool empty () const β€” const-qualified, returns bool
  • iterator end () β€” no args in, iterator out
  • void erase (point_iterator) β€” takes a point_iterator, returns void
  • template<typename Pred> size_type erase_if (Pred) β€” templated on Pred, takes a Pred, hands back a size_type
  • Cmp_Fn & get_cmp_fn () β€” no args, returns a reference to Cmp_Fn
  • void join (binomial_heap_base< Value_Type, Cmp_Fn, _Alloc > &) β€” takes a reference to binomial_heap_base< Value_Type, Cmp_Fn, _Alloc >, returns void
  • size_type max_size () const β€” const, returns size_type
  • void modify (point_iterator, const_reference) β€” takes a point_iterator and a const_reference, returns void
  • void pop () β€” nothing in, void out
  • point_iterator push (const_reference) β€” takes a const_reference, gives you a point_iterator back
  • size_type size () const β€” const-qualified, returns size_type
  • template<typename Pred> void split (Pred, binomial_heap_base< Value_Type, Cmp_Fn, _Alloc > &) β€” templated on Pred, takes a Pred and a reference to binomial_heap_base< Value_Type, Cmp_Fn, _Alloc >, returns void
  • void swap (left_child_next_sibling_heap< Value_Type, Cmp_Fn, _Alloc::size_type, _Alloc > &) β€” takes a reference to left_child_next_sibling_heap< Value_Type, Cmp_Fn, _Alloc::size_type, _Alloc >, returns void
  • const_reference top () const β€” const, returns const_reference

πŸ’œ Protected Types πŸ’œ

family-only section, iykyk:

  • typedef base_type::node node β€” node type, from base_type
  • typedef alloc_traits::allocator_type node_allocator β€” node allocator, from alloc_traits
  • typedef _Alloc::size_type node_metadata β€” node metadata, typed as _Alloc::size_type
  • typedef std::pair< node_pointer, node_pointer > node_pointer_pair β€” a std::pair of two node_pointers

🧚 Protected Member Functions 🧚

  • void actual_erase_node (node_pointer) β€” takes a node_pointer, returns void
  • void bubble_to_top (node_pointer) β€” takes a node_pointer, returns void
  • void clear_imp (node_pointer) β€” takes a node_pointer, returns void
  • template<typename It> void copy_from_range (It, It) β€” templated on It, takes two Its, returns void
  • void find_max () β€” no args, void return
  • node_pointer get_new_node_for_insert (const_reference) β€” takes a const_reference, returns a node_pointer
  • node_pointer prune (Pred) β€” takes a Pred, returns a node_pointer
  • void swap (binomial_heap_base< Value_Type, Cmp_Fn, _Alloc > &) β€” takes a reference to binomial_heap_base< Value_Type, Cmp_Fn, _Alloc >, returns void
  • void swap_with_parent (node_pointer, node_pointer) β€” takes two node_pointers, returns void
  • void to_linked_list () β€” no args, void return
  • void value_swap (left_child_next_sibling_heap &) β€” takes a reference to left_child_next_sibling_heap, returns void

⭐ Static Protected Member Functions ⭐

  • static void make_child_of (node_pointer, node_pointer) β€” static, takes two node_pointers, returns void
  • static node_pointer parent (node_pointer) β€” static, takes a node_pointer, returns a node_pointer

πŸ“ Protected Attributes πŸ“

  • node_pointer m_p_max β€” a node_pointer named m_p_max
  • node_pointer m_p_root β€” a node_pointer named m_p_root
  • size_type m_size β€” a size_type named m_size

🌈 Detailed Description 🌈

template<typename Value_Type, typename Cmp_Fn, typename _Alloc>
    class __gnu_pbds::detail::binomial_heap< Value_Type, Cmp_Fn, _Alloc >

Binomial heap.

and that's literally the entire detailed description, bestie. the docs said "Binomial heap." and then dipped. iconic honestly. πŸ’€


πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for libstdc++ from the source code.


okay and that's the whole page!! 🫢 this one lives in the Library Functions Manual, it's part of the libstdc++ crew, and the author line is literally "Generated automatically by Doxygen for libstdc++ from the source code" β€” so yes, a robot wrote it, and honestly? it ate. πŸ’…βœ¨ go forth and heap, bestie!! πŸ¦‹πŸŒΈ

πŸ“¦ 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
  • 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