__GNU_PBDS::DETAIL::BINOMIAL_HEAP(3cxx)
π __gnu_pbds::detail::binomial_heap< Value_Type, Cmp_Fn, _Alloc > π
okay so bestie, welcome to the 3cxx manual page for this binomial-heap template. It is giving deep library internals, and we are going to keep every single signature because that is the whole assignment. π
πΈ NAME πΈ
__gnu_pbds::detail::binomial_heap< Value_Type, Cmp_Fn, _Alloc > β this is the class this whole page is about, no cap.
β¨ SYNOPSIS β¨
#include <binomial_heap_.hpp>
It inherits from __gnu_pbds::detail::binomial_heap_base< Value_Type, Cmp_Fn, _Alloc >.
π Public Types π
typedef base_type::allocator_type allocator_typeβ the allocator type, handed down frombase_type.typedef base_type::cmp_fn cmp_fnβ the comparator type, also frombase_type.typedef base_type::const_iterator const_iteratorβ the const iterator type frombase_type.typedef base_type::const_pointer const_pointerβ the const pointer type frombase_type.typedef base_type::const_reference const_referenceβ the const reference type frombase_type.typedef _Alloc::difference_type difference_typeβ thedifference_typefrom_Alloc.typedef base_type::iterator iteratorβ the iterator type frombase_type.typedef base_type::point_const_iterator point_const_iteratorβ the point const iterator type frombase_type.typedef base_type::point_iterator point_iteratorβ the point iterator type frombase_type.typedef base_type::pointer pointerβ the pointer type frombase_type.typedef base_type::reference referenceβ the reference type frombase_type.typedef _Alloc::size_type size_typeβ thesize_typefrom_Alloc.typedef Value_Type value_typeβ the value type, literallyValue_Type.
π Public Member Functions π
binomial_heap (const binomial_heap &)β copy-constructor energy; it takes anotherbinomial_heap.binomial_heap (const Cmp_Fn &)β builds one from aCmp_Fn.iterator begin ()β gives you a regulariteratorto the beginning.const_iterator begin () constβ gives you aconst_iteratorto the beginning.void clear ()β clears it out.bool empty () constβ tells you whether it is empty.iterator end ()β gives you a regulariteratorto the end.const_iterator end () constβ gives you aconst_iteratorto the end.void erase (point_iterator)β erases at apoint_iterator.template<typename Pred > size_type erase_if (Pred)β thePred-based erase-if situation, returning asize_type.Cmp_Fn & get_cmp_fn ()β returns a non-const reference to theCmp_Fn.const Cmp_Fn & get_cmp_fn () constβ returns a const reference to theCmp_Fn.void join (binomial_heap_base< Value_Type, Cmp_Fn, _Alloc > &)β joins with abinomial_heap_base< Value_Type, Cmp_Fn, _Alloc > &.size_type max_size () constβ returns the max size as asize_type.void modify (point_iterator, const_reference)β modifies at apoint_iterator, using aconst_reference.void pop ()β pops it.point_iterator push (const_reference)β pushes aconst_referenceand hands back apoint_iterator.size_type size () constβ returns the size as asize_type.template<typename Pred > void split (Pred, binomial_heap_base< Value_Type, Cmp_Fn, _Alloc > &)β splits usingPred, into abinomial_heap_base< Value_Type, Cmp_Fn, _Alloc > &.void swap (left_child_next_sibling_heap< Value_Type, Cmp_Fn, _Alloc::size_type, _Alloc > &)β swaps with aleft_child_next_sibling_heap< Value_Type, Cmp_Fn, _Alloc::size_type, _Alloc > &.const_reference top () constβ returns the top as aconst_reference.
π¦ Protected Types π¦
typedef base_type::node nodeβ the node type frombase_type.typedef alloc_traits::allocator_type node_allocatorβ the node allocator type fromalloc_traits.typedef _Alloc::size_type node_metadataβ node metadata as_Alloc::size_type.typedef std::pair< node_pointer, node_pointer > node_pointer_pairβ astd::pair< node_pointer, node_pointer >.
πΈ Protected Member Functions πΈ
void actual_erase_node (node_pointer)β the actual erase-node helper, taking anode_pointer.void bubble_to_top (node_pointer)β bubbles anode_pointerto the top.void clear_imp (node_pointer)β theclear_imphelper, taking anode_pointer.template<typename It > void copy_from_range (It, It)β copies from anItrange into anotherIt.void find_max ()β finds the max.node_pointer get_new_node_for_insert (const_reference)β gets a new node for insertion from aconst_reference, returning anode_pointer.node_pointer prune (Pred)β prunes usingPred, returning anode_pointer.void swap (binomial_heap_base< Value_Type, Cmp_Fn, _Alloc > &)β swaps with abinomial_heap_base< Value_Type, Cmp_Fn, _Alloc > &.void swap_with_parent (node_pointer, node_pointer)β swaps with a parent, taking twonode_pointers.void to_linked_list ()β converts to a linked list.void value_swap (left_child_next_sibling_heap &)β swaps values with aleft_child_next_sibling_heap &.
β Static Protected Member Functions β
static void make_child_of (node_pointer, node_pointer)β static helper that makes onenode_pointera child of anothernode_pointer.static node_pointer parent (node_pointer)β static helper that takes anode_pointerand returns anode_pointerparent.
π Protected Attributes π
node_pointer m_p_maxβ anode_pointerattribute namedm_p_max.node_pointer m_p_rootβ anode_pointerattribute namedm_p_root.size_type m_sizeβ asize_typeattribute namedm_size.
π Detailed Description π
template<typename Value_Type, typename Cmp_Fn, typename _Alloc>
class __gnu_pbds::detail::binomial_heap< Value_Type, Cmp_Fn, _Alloc >
and the description is literally: Binomial heap.
π Author π
Generated automatically by Doxygen for libstdc++ from the source code.
xoxo, your Unix bestie π
β source/version: libstdc++; the footer text is libstd__gnu_pbds::de...mp_Fn, _Alloc >(3cxx); date: the original footer does not print one, so Iβm not gonna invent it, periodt. π«Ά
π¦ where this page comes from
- ubuntu noble: libstdc++-14-doc 14-20240412-0ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms