__GNU_PBDS::DETAIL::LEFT_CHILD_NEXT_SIBLING_HEAP(3)

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

πŸ’– NAME πŸ’–

__gnu_pbds::detail::left_child_next_sibling_heap< Value_Type, Cmp_Fn, Node_Metadata, _Alloc > β€” it's the base class for a basic heap, bestie. That's the whole job description. It's giving "blueprint era" ✨

(also this page lives in the Library Functions Manual, just so you know where you wandered into 🫢)


✨ SYNOPSIS ✨

#include <left_child_next_sibling_heap_.hpp>

Inherited by __gnu_pbds::detail::pairing_heap< _VTp, Cmp_Fn, _Alloc >, and __gnu_pbds::detail::thin_heap< _VTp, Cmp_Fn, _Alloc >.

So yeah, these two are the nepo babies inheriting the whole vibe πŸ’…


🌸 Public Types 🌸

  • typedef _Alloc allocator_type β€” the allocator, wearing its allocator_type name tag πŸŽ€
  • typedef Cmp_Fn cmp_fn β€” the comparison function type, going by cmp_fn around here
  • typedef left_child_next_sibling_heap_const_iterator_< node, _Alloc > const_iterator β€” the const iterator glow-up ⭐
  • typedef __rebind_v::const_pointer const_pointer β€” a pointer that cannot and will not be changed, periodt
  • typedef __rebind_v::const_reference const_reference β€” same energy but a reference πŸ¦‹
  • typedef _Alloc::difference_type difference_type β€” for when you gotta measure the distance between things
  • typedef const_iterator iterator β€” yup, the iterator is literally just the const_iterator here. no cap. that's the tea β˜•
  • typedef left_child_next_sibling_heap_node_< Value_Type, Node_Metadata, _Alloc > node β€” the node type, the main character of the data structure πŸ‘‘
  • typedef left_child_next_sibling_heap_node_point_const_iterator_< node, _Alloc > point_const_iterator β€” a const iterator that points at nodes directly πŸ“
  • typedef point_const_iterator point_iterator β€” and the non-const-named version is literally the same type again. iconic πŸ™ˆ
  • typedef __rebind_v::pointer pointer β€” the regular pointer, no const in sight
  • typedef __rebind_v::reference reference β€” a regular reference, living its best life
  • typedef _Alloc::size_type size_type β€” the type for sizes, obviously
  • typedef Value_Type value_type β€” the value type. the actual content. the substance πŸ’–

πŸ’… Public Member Functions πŸ’…

  • left_child_next_sibling_heap (const Cmp_Fn &) β€” constructor that takes a const Cmp_Fn & 🫢
  • left_child_next_sibling_heap (const left_child_next_sibling_heap &) β€” the copy constructor, copying the whole thing
  • iterator begin () β€” hands you an iterator pointing at the beginning
  • const_iterator begin () const β€” same, but const, returns a const_iterator
  • void clear () β€” wipes it. returns nothing. void. no notes ✨
  • bool empty () const β€” const, returns a bool, tells you if it's empty
  • iterator end () β€” the iterator for the end
  • const_iterator end () const β€” const version, const_iterator, the end
  • Cmp_Fn & get_cmp_fn () β€” hands you a non-const Cmp_Fn &
  • const Cmp_Fn & get_cmp_fn () const β€” const overload, gives you a const Cmp_Fn &
  • size_type max_size () const β€” const, gives you a size_type, the max size
  • size_type size () const β€” const, gives you a size_type, the size
  • void swap (left_child_next_sibling_heap< Value_Type, Cmp_Fn, Node_Metadata, _Alloc > &) β€” swaps with another one of these exact things, takes a reference, returns void πŸ”₯

πŸŽ€ Protected Types πŸŽ€

  • typedef alloc_traits::allocator_type node_allocator β€” allocator but for nodes
  • typedef alloc_traits::const_pointer node_const_pointer β€” const pointer, node edition
  • typedef Node_Metadata node_metadata β€” the metadata, calling itself node_metadata
  • typedef alloc_traits::pointer node_pointer β€” the pointer to a node. the classic
  • typedef std::pair< node_pointer, node_pointer > node_pointer_pair β€” two node pointers, paired up, std::pair style πŸ’ž

🫢 Protected Member Functions 🫢

  • void actual_erase_node (node_pointer) β€” takes a node_pointer, returns void. the actual one, allegedly 😭
  • void bubble_to_top (node_pointer) β€” node_pointer in, void out. bubbling. to the top. as one does 🫧
  • void clear_imp (node_pointer) β€” the implementation-flavoured clear, takes a node_pointer
  • node_pointer get_new_node_for_insert (const_reference) β€” takes a const_reference, gives you back a fresh node_pointer
  • template<typename Pred> node_pointer prune (Pred) β€” templated on Pred, takes a Pred, returns a node_pointer. pruning szn 🌿
  • void swap_with_parent (node_pointer, node_pointer) β€” two node_pointers go in, void comes out, parent gets swapped
  • void to_linked_list () β€” no args, void return, turns the whole thing into a linked list
  • void value_swap (left_child_next_sibling_heap &) β€” takes a reference to one of these and swaps the values

🌟 Static Protected Member Functions 🌟

  • static void make_child_of (node_pointer, node_pointer) β€” static, takes two node_pointers, returns void, makes one a child of the other πŸ‘Ά
  • static node_pointer parent (node_pointer) β€” static, takes a node_pointer, returns the parent node_pointer 🧬

πŸ¦‹ Protected Attributes πŸ¦‹

  • node_pointer m_p_root β€” the root pointer. the anchor. the moment 🫢
  • size_type m_size β€” the size. that's it. that's the attribute πŸ’…

πŸ”₯ Detailed Description πŸ”₯

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

Base class for a basic heap. That's the whole detailed description bestie, they really said "you get one sentence and it's a good one" 😭


πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for libstdc++ from the source code. So nobody hand-wrote this β€” the machine did it and honestly? it ate ✨


okay that's the whole page, bestie πŸ’– huge shoutout to libstdc++ for shipping this one to us, Doxygen-generated and everything, no date on the tin, just pure library-manual energy πŸŽ€ slay, go build a heap, ily 🫢

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