__GNU_PBDS::DETAIL::LEFT_CHILD_NEXT_SIBLING_HEAP(3)
π 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 itsallocator_typename tag πtypedef Cmp_Fn cmp_fnβ the comparison function type, going bycmp_fnaround heretypedef 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, periodttypedef __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 thingstypedef const_iterator iteratorβ yup, theiteratoris literally just theconst_iteratorhere. 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 sighttypedef __rebind_v::reference referenceβ a regular reference, living its best lifetypedef _Alloc::size_type size_typeβ the type for sizes, obviouslytypedef 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 aconst Cmp_Fn &π«Άleft_child_next_sibling_heap (const left_child_next_sibling_heap &)β the copy constructor, copying the whole thingiterator begin ()β hands you aniteratorpointing at the beginningconst_iterator begin () constβ same, butconst, returns aconst_iteratorvoid clear ()β wipes it. returns nothing.void. no notes β¨bool empty () constβconst, returns abool, tells you if it's emptyiterator end ()β theiteratorfor the endconst_iterator end () constβconstversion,const_iterator, the endCmp_Fn & get_cmp_fn ()β hands you a non-constCmp_Fn &const Cmp_Fn & get_cmp_fn () constβconstoverload, gives you aconst Cmp_Fn &size_type max_size () constβconst, gives you asize_type, the max sizesize_type size () constβconst, gives you asize_type, the sizevoid swap (left_child_next_sibling_heap< Value_Type, Cmp_Fn, Node_Metadata, _Alloc > &)β swaps with another one of these exact things, takes a reference, returnsvoidπ₯
π Protected Types π
typedef alloc_traits::allocator_type node_allocatorβ allocator but for nodestypedef alloc_traits::const_pointer node_const_pointerβ const pointer, node editiontypedef Node_Metadata node_metadataβ the metadata, calling itselfnode_metadatatypedef alloc_traits::pointer node_pointerβ the pointer to a node. the classictypedef std::pair< node_pointer, node_pointer > node_pointer_pairβ two node pointers, paired up,std::pairstyle π
π«Ά Protected Member Functions π«Ά
void actual_erase_node (node_pointer)β takes anode_pointer, returnsvoid. the actual one, allegedly πvoid bubble_to_top (node_pointer)βnode_pointerin,voidout. bubbling. to the top. as one does π«§void clear_imp (node_pointer)β the implementation-flavoured clear, takes anode_pointernode_pointer get_new_node_for_insert (const_reference)β takes aconst_reference, gives you back a freshnode_pointertemplate<typename Pred> node_pointer prune (Pred)β templated onPred, takes aPred, returns anode_pointer. pruning szn πΏvoid swap_with_parent (node_pointer, node_pointer)β twonode_pointers go in,voidcomes out, parent gets swappedvoid to_linked_list ()β no args,voidreturn, turns the whole thing into a linked listvoid 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 twonode_pointers, returnsvoid, makes one a child of the other πΆstatic node_pointer parent (node_pointer)βstatic, takes anode_pointer, returns the parentnode_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