__GNU_PBDS::DETAIL::BINOMIAL_HEAP(3)
π 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 ofbase_typetypedef base_type::cmp_fn cmp_fnβ the comparator type, straight frombase_typetypedef base_type::const_iterator const_iteratorβ const iterator,base_type's versiontypedef base_type::const_pointer const_pointerβ const pointer, again frombase_typetypedef base_type::const_reference const_referenceβ const reference,base_typecoded ittypedef _Alloc::difference_type difference_typeβ difference type, and this one comes from_Alloctypedef base_type::iterator iteratorβ the regular iterator,base_typeflavoredtypedef base_type::point_const_iterator point_const_iteratorβ point const iterator, frombase_typetypedef base_type::point_iterator point_iteratorβ point iterator,base_typesaid sotypedef base_type::pointer pointerβ pointer,base_typeeditiontypedef base_type::reference referenceβ reference,base_typecodedtypedef _Alloc::size_type size_typeβ size type, and this one's from_Alloctypedef Value_Type value_typeβ value type, which is literally justValue_Typeπ
π Public Member Functions π
binomial_heap (const binomial_heap &)β a constructor that takes aconst binomial_heap &. copy-paste erabinomial_heap (const Cmp_Fn &)β a constructor that takes aconst Cmp_Fn &iterator begin ()β takes nothing, gives you back aniteratorvoid clear ()β no args, no return, justvoidbool empty () constβ const-qualified, returnsbooliterator end ()β no args in,iteratoroutvoid erase (point_iterator)β takes apoint_iterator, returnsvoidtemplate<typename Pred> size_type erase_if (Pred)β templated onPred, takes aPred, hands back asize_typeCmp_Fn & get_cmp_fn ()β no args, returns a reference toCmp_Fnvoid join (binomial_heap_base< Value_Type, Cmp_Fn, _Alloc > &)β takes a reference tobinomial_heap_base< Value_Type, Cmp_Fn, _Alloc >, returnsvoidsize_type max_size () constβ const, returnssize_typevoid modify (point_iterator, const_reference)β takes apoint_iteratorand aconst_reference, returnsvoidvoid pop ()β nothing in,voidoutpoint_iterator push (const_reference)β takes aconst_reference, gives you apoint_iteratorbacksize_type size () constβ const-qualified, returnssize_typetemplate<typename Pred> void split (Pred, binomial_heap_base< Value_Type, Cmp_Fn, _Alloc > &)β templated onPred, takes aPredand a reference tobinomial_heap_base< Value_Type, Cmp_Fn, _Alloc >, returnsvoidvoid swap (left_child_next_sibling_heap< Value_Type, Cmp_Fn, _Alloc::size_type, _Alloc > &)β takes a reference toleft_child_next_sibling_heap< Value_Type, Cmp_Fn, _Alloc::size_type, _Alloc >, returnsvoidconst_reference top () constβ const, returnsconst_reference
π Protected Types π
family-only section, iykyk:
typedef base_type::node nodeβ node type, frombase_typetypedef alloc_traits::allocator_type node_allocatorβ node allocator, fromalloc_traitstypedef _Alloc::size_type node_metadataβ node metadata, typed as_Alloc::size_typetypedef std::pair< node_pointer, node_pointer > node_pointer_pairβ astd::pairof twonode_pointers
π§ Protected Member Functions π§
void actual_erase_node (node_pointer)β takes anode_pointer, returnsvoidvoid bubble_to_top (node_pointer)β takes anode_pointer, returnsvoidvoid clear_imp (node_pointer)β takes anode_pointer, returnsvoidtemplate<typename It> void copy_from_range (It, It)β templated onIt, takes twoIts, returnsvoidvoid find_max ()β no args,voidreturnnode_pointer get_new_node_for_insert (const_reference)β takes aconst_reference, returns anode_pointernode_pointer prune (Pred)β takes aPred, returns anode_pointervoid swap (binomial_heap_base< Value_Type, Cmp_Fn, _Alloc > &)β takes a reference tobinomial_heap_base< Value_Type, Cmp_Fn, _Alloc >, returnsvoidvoid swap_with_parent (node_pointer, node_pointer)β takes twonode_pointers, returnsvoidvoid to_linked_list ()β no args,voidreturnvoid value_swap (left_child_next_sibling_heap &)β takes a reference toleft_child_next_sibling_heap, returnsvoid
β Static Protected Member Functions β
static void make_child_of (node_pointer, node_pointer)βstatic, takes twonode_pointers, returnsvoidstatic node_pointer parent (node_pointer)βstatic, takes anode_pointer, returns anode_pointer
π Protected Attributes π
node_pointer m_p_maxβ anode_pointernamedm_p_maxnode_pointer m_p_rootβ anode_pointernamedm_p_rootsize_type m_sizeβ asize_typenamedm_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