__GNU_PBDS::DETAIL::BINOMIAL_HEAP_BASE(3)

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

πŸ’– __gnu_pbds::detail::binomial_heap_base< Value_Type, Cmp_Fn, _Alloc > (3) πŸ’–

okay so bestie, welcome to the Library Functions Manual, and buckle up because today we're reading about __gnu_pbds::detail::binomial_heap_base< Value_Type, Cmp_Fn, _Alloc > and honestly? she's giving foundation. she's the blueprint. the moment before the moment. let's get into it 🫢


✨ NAME ✨

__gnu_pbds::detail::binomial_heap_base< Value_Type, Cmp_Fn, _Alloc > β€” the base class for binomial heap. yeah. she's the base. everything else is standing on her shoulders πŸ’…


🌸 SYNOPSIS 🌸

#include <binomial_heap_base_.hpp>

Inherits __gnu_pbds::detail::left_child_next_sibling_heap< Value_Type, Cmp_Fn, _Alloc::size_type, _Alloc >. so like, that's her mom. her lineage. iconic family tree ngl 🌳

Inherited by these four beauties, all of whom she raised:

  • __gnu_pbds::detail::binomial_heap< _VTp, Cmp_Fn, _Alloc >
  • __gnu_pbds::detail::rc_binomial_heap< _VTp, Cmp_Fn, _Alloc >
  • __gnu_pbds::detail::binomial_heap< Value_Type, Cmp_Fn, _Alloc >
  • __gnu_pbds::detail::rc_binomial_heap< Value_Type, Cmp_Fn, _Alloc >

not her being a whole mother to four classes 😭


🌈 Public Types

the whole squad of type aliases, no cap:

  • typedef _Alloc allocator_type
  • typedef Cmp_Fn cmp_fn
  • typedef base_type::const_iterator const_iterator
  • typedef __rebind_v::const_pointer const_pointer
  • typedef __rebind_v::const_reference const_reference
  • typedef _Alloc::difference_type difference_type
  • typedef base_type::iterator iterator
  • typedef base_type::point_const_iterator point_const_iterator
  • typedef base_type::point_iterator point_iterator
  • typedef __rebind_v::pointer pointer
  • typedef __rebind_v::reference reference
  • typedef _Alloc::size_type size_type
  • typedef Value_Type value_type

πŸ¦‹ Public Member Functions

every single one, exactly as written, because we do not skip:

  • iterator begin ()
  • void clear ()
  • bool empty () const
  • iterator end ()
  • void erase (point_iterator)
  • template<typename Pred> size_type erase_if (Pred)
  • Cmp_Fn & get_cmp_fn ()
  • void join (binomial_heap_base< Value_Type, Cmp_Fn, _Alloc > &)
  • size_type max_size () const
  • void modify (point_iterator, const_reference)
  • void pop ()
  • point_iterator push (const_reference)
  • size_type size () const
  • template<typename Pred> void split (Pred, binomial_heap_base< Value_Type, Cmp_Fn, _Alloc > &)
  • void swap (left_child_next_sibling_heap< Value_Type, Cmp_Fn, _Alloc::size_type, _Alloc > &)
  • const_reference top () const

πŸŽ€ Protected Types

the ones only the family gets to see πŸ”’:

  • typedef base_type::node node
  • typedef alloc_traits::allocator_type node_allocator
  • typedef base_type::node_const_pointer node_const_pointer
  • typedef _Alloc::size_type node_metadata
  • typedef base_type::node_pointer node_pointer
  • typedef std::pair< node_pointer, node_pointer > node_pointer_pair

🧚 Protected Member Functions

behind-the-scenes besties doing the real work, fr fr:

  • binomial_heap_base (const binomial_heap_base< Value_Type, Cmp_Fn, _Alloc > &)
  • binomial_heap_base (const Cmp_Fn &)
  • void actual_erase_node (node_pointer)
  • void bubble_to_top (node_pointer)
  • void clear_imp (node_pointer)
  • template<typename It> void copy_from_range (It, It)
  • void find_max ()
  • node_pointer get_new_node_for_insert (const_reference)
  • node_pointer prune (Pred)
  • void swap (binomial_heap_base< Value_Type, Cmp_Fn, _Alloc > &)
  • void swap_with_parent (node_pointer, node_pointer)
  • void to_linked_list ()
  • void value_swap (left_child_next_sibling_heap &)

πŸ‘‘ Static Protected Member Functions

static, protected, and thriving:

  • static void make_child_of (node_pointer, node_pointer)
  • static node_pointer parent (node_pointer)

πŸ“ Protected Attributes

the three little variables that hold it all together πŸ₯Ή:

  • node_pointer m_p_max
  • node_pointer m_p_root
  • size_type m_size

πŸ’œ Detailed Description

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

and what does she do? she's the base class for binomial heap. that's the whole vibe. that's the whole job. she said "I'm the foundation, you're welcome" and honestly? slay πŸ’…βœ¨


🫢 Author

Generated automatically by Doxygen for libstdc++ from the source code. like, a robot wrote this and we're all just reading it. no cap. πŸ€–πŸ’–


and that's the tea bestie β€” this page came straight out of libstdc++'s docs, Doxygen-generated, sitting pretty in the Library Functions Manual. go build something cute with it. mwah πŸŽ€πŸ’–βœ¨
πŸ“¦ 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