__GNU_PBDS::DETAIL::LEFT_CHILD_NEXT_SIBLING_HEAP(3cxx)

libstdc++ manual, section 3cxx — okay bestie, we are deep in the C++ headers and the vibes are structural. 💖

NAME

__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 NAME moment, and yes, it’s a whole template situation. 🫶

SYNOPSIS

First things first: you pull in this header, and then the class inherits Cmp_Fn. No cap.

#include <left_child_next_sibling_heap_.hpp>

Inherits Cmp_Fn.

Public Types

The full type cast, no skips, no “oops I forgot one” energy:

  • typedef _Alloc allocator_type
  • typedef Cmp_Fn cmp_fn
  • typedef left_child_next_sibling_heap_const_iterator_< node, _Alloc > const_iterator
  • typedef __rebind_v::const_pointer const_pointer
  • typedef __rebind_v::const_reference const_reference
  • typedef _Alloc::difference_type difference_type
  • typedef const_iterator iterator
  • typedef left_child_next_sibling_heap_node_< Value_Type, Node_Metadata, _Alloc > node
  • typedef left_child_next_sibling_heap_node_point_const_iterator_< node, _Alloc > point_const_iterator
  • typedef point_const_iterator point_iterator
  • typedef __rebind_v::pointer pointer
  • typedef __rebind_v::reference reference
  • typedef _Alloc::size_type size_type
  • typedef Value_Type value_type

Public Member Functions

These are the public-facing main characters ✨ — every single one, exactly as listed:

  • left_child_next_sibling_heap (const Cmp_Fn &)
  • left_child_next_sibling_heap (const left_child_next_sibling_heap &)
  • iterator begin ()
  • const_iterator begin () const
  • void clear ()
  • bool empty () const
  • iterator end ()
  • const_iterator end () const
  • Cmp_Fn & get_cmp_fn ()
  • const Cmp_Fn & get_cmp_fn () const
  • size_type max_size () const
  • size_type size () const
  • void swap (left_child_next_sibling_heap< Value_Type, Cmp_Fn, Node_Metadata, _Alloc > &)

Protected Types

Backstage types, still invited to the group chat 💅:

  • typedef alloc_traits::allocator_type node_allocator
  • typedef alloc_traits::const_pointer node_const_pointer
  • typedef Node_Metadata node_metadata
  • typedef alloc_traits::pointer node_pointer
  • typedef std::pair< node_pointer, node_pointer > node_pointer_pair

Protected Member Functions

Protected function lore, in full, because we do not gatekeep here:

  • void actual_erase_node (node_pointer)
  • void bubble_to_top (node_pointer)
  • void clear_imp (node_pointer)
  • node_pointer get_new_node_for_insert (const_reference)
  • template<typename Pred > node_pointer prune (Pred)
  • void swap_with_parent (node_pointer, node_pointer)
  • void to_linked_list ()
  • void value_swap (left_child_next_sibling_heap &)

Static Protected Member Functions

The static protected duo, serving looks 🌸:

  • static void make_child_of (node_pointer, node_pointer)
  • static node_pointer parent (node_pointer)

Protected Attributes

The protected attributes shelf, literally just these two:

  • node_pointer m_p_root
  • size_type m_size

Detailed Description

Okay so the whole template declaration is giving very “we live in a header” realness:

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 >

And the description is literally: Base class for a basic heap. Periodt. 🦋

Author

Author line, word for word: Generated automatically by Doxygen for libstdc++ from the source code.


Bye bestie 💜 — source/version: libstdc++; manual section: 3cxx; footer date: not shown in the copy we got, so this is the cute sign-off instead. Stay heaped, stay iconic. 🎀

📦 where this page comes from