__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 from base_type.
  • typedef base_type::cmp_fn cmp_fn β€” the comparator type, also from base_type.
  • typedef base_type::const_iterator const_iterator β€” the const iterator type from base_type.
  • typedef base_type::const_pointer const_pointer β€” the const pointer type from base_type.
  • typedef base_type::const_reference const_reference β€” the const reference type from base_type.
  • typedef _Alloc::difference_type difference_type β€” the difference_type from _Alloc.
  • typedef base_type::iterator iterator β€” the iterator type from base_type.
  • typedef base_type::point_const_iterator point_const_iterator β€” the point const iterator type from base_type.
  • typedef base_type::point_iterator point_iterator β€” the point iterator type from base_type.
  • typedef base_type::pointer pointer β€” the pointer type from base_type.
  • typedef base_type::reference reference β€” the reference type from base_type.
  • typedef _Alloc::size_type size_type β€” the size_type from _Alloc.
  • typedef Value_Type value_type β€” the value type, literally Value_Type.

πŸ’… Public Member Functions πŸ’…

  • binomial_heap (const binomial_heap &) β€” copy-constructor energy; it takes another binomial_heap.
  • binomial_heap (const Cmp_Fn &) β€” builds one from a Cmp_Fn.
  • iterator begin () β€” gives you a regular iterator to the beginning.
  • const_iterator begin () const β€” gives you a const_iterator to the beginning.
  • void clear () β€” clears it out.
  • bool empty () const β€” tells you whether it is empty.
  • iterator end () β€” gives you a regular iterator to the end.
  • const_iterator end () const β€” gives you a const_iterator to the end.
  • void erase (point_iterator) β€” erases at a point_iterator.
  • template<typename Pred > size_type erase_if (Pred) β€” the Pred-based erase-if situation, returning a size_type.
  • Cmp_Fn & get_cmp_fn () β€” returns a non-const reference to the Cmp_Fn.
  • const Cmp_Fn & get_cmp_fn () const β€” returns a const reference to the Cmp_Fn.
  • void join (binomial_heap_base< Value_Type, Cmp_Fn, _Alloc > &) β€” joins with a binomial_heap_base< Value_Type, Cmp_Fn, _Alloc > &.
  • size_type max_size () const β€” returns the max size as a size_type.
  • void modify (point_iterator, const_reference) β€” modifies at a point_iterator, using a const_reference.
  • void pop () β€” pops it.
  • point_iterator push (const_reference) β€” pushes a const_reference and hands back a point_iterator.
  • size_type size () const β€” returns the size as a size_type.
  • template<typename Pred > void split (Pred, binomial_heap_base< Value_Type, Cmp_Fn, _Alloc > &) β€” splits using Pred, into a binomial_heap_base< Value_Type, Cmp_Fn, _Alloc > &.
  • void swap (left_child_next_sibling_heap< Value_Type, Cmp_Fn, _Alloc::size_type, _Alloc > &) β€” swaps with a left_child_next_sibling_heap< Value_Type, Cmp_Fn, _Alloc::size_type, _Alloc > &.
  • const_reference top () const β€” returns the top as a const_reference.

πŸ¦‹ Protected Types πŸ¦‹

  • typedef base_type::node node β€” the node type from base_type.
  • typedef alloc_traits::allocator_type node_allocator β€” the node allocator type from alloc_traits.
  • typedef _Alloc::size_type node_metadata β€” node metadata as _Alloc::size_type.
  • typedef std::pair< node_pointer, node_pointer > node_pointer_pair β€” a std::pair< node_pointer, node_pointer >.

🌸 Protected Member Functions 🌸

  • void actual_erase_node (node_pointer) β€” the actual erase-node helper, taking a node_pointer.
  • void bubble_to_top (node_pointer) β€” bubbles a node_pointer to the top.
  • void clear_imp (node_pointer) β€” the clear_imp helper, taking a node_pointer.
  • template<typename It > void copy_from_range (It, It) β€” copies from an It range into another It.
  • void find_max () β€” finds the max.
  • node_pointer get_new_node_for_insert (const_reference) β€” gets a new node for insertion from a const_reference, returning a node_pointer.
  • node_pointer prune (Pred) β€” prunes using Pred, returning a node_pointer.
  • void swap (binomial_heap_base< Value_Type, Cmp_Fn, _Alloc > &) β€” swaps with a binomial_heap_base< Value_Type, Cmp_Fn, _Alloc > &.
  • void swap_with_parent (node_pointer, node_pointer) β€” swaps with a parent, taking two node_pointers.
  • void to_linked_list () β€” converts to a linked list.
  • void value_swap (left_child_next_sibling_heap &) β€” swaps values with a left_child_next_sibling_heap &.

⭐ Static Protected Member Functions ⭐

  • static void make_child_of (node_pointer, node_pointer) β€” static helper that makes one node_pointer a child of another node_pointer.
  • static node_pointer parent (node_pointer) β€” static helper that takes a node_pointer and returns a node_pointer parent.

πŸ“ Protected Attributes πŸ“

  • node_pointer m_p_max β€” a node_pointer attribute named m_p_max.
  • node_pointer m_p_root β€” a node_pointer attribute named m_p_root.
  • size_type m_size β€” a size_type attribute named m_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