API Documentation
Loading...
Searching...
No Matches
BinaryHeap< t_comp_type, t_value_type, t_is_min > Class Template Reference

#include <BinaryHeap.hpp>

Public Member Functions

 BinaryHeap (uint04 size)
 
void insert (t_comp_type comparison, t_value_type value)
 
const Buffer< std::pair< t_value_type, t_comp_type > > & values () const
 
Buffer< std::pair< t_value_type, t_comp_type > > & values ()
 
t_comp_type extremeComp () const
 
t_value_type extremeValue () const
 
void clear ()
 
uint04 size () const
 
const Buffer< std::pair< t_value_type, t_comp_type > > & _getAll () const
 
Buffer< std::pair< t_value_type, t_comp_type > > sortedValues () const
 
Buffer< t_value_type > sortedIndices () const
 
t_value_type replaceExtreme (t_comp_type comparison, t_value_type value) const
 
t_value_type popExtreme ()
 
void deleteExtreme ()
 

Protected Member Functions

void bubbleDown (uint04 index)
 
void bubbleUp (uint04 index)
 

Static Protected Member Functions

static bool Compare (t_comp_type a, t_comp_type b)
 

Constructor & Destructor Documentation

◆ BinaryHeap()

template<class t_comp_type , class t_value_type , bool t_is_min>
BinaryHeap ( uint04 size)
inlineexplicit

Member Function Documentation

◆ _getAll()

template<class t_comp_type , class t_value_type , bool t_is_min>
const Buffer< std::pair< t_value_type, t_comp_type > > & _getAll ( ) const
inline

◆ bubbleDown()

template<class t_comp_type , class t_value_type , bool t_is_min>
void bubbleDown ( uint04 index)
inlineprotected

◆ bubbleUp()

template<class t_comp_type , class t_value_type , bool t_is_min>
void bubbleUp ( uint04 index)
inlineprotected

◆ clear()

template<class t_comp_type , class t_value_type , bool t_is_min>
void clear ( )
inline

◆ Compare()

template<class t_comp_type , class t_value_type , bool t_is_min>
static bool Compare ( t_comp_type a,
t_comp_type b )
inlinestaticprotected

◆ deleteExtreme()

template<class t_comp_type , class t_value_type , bool t_is_min>
void deleteExtreme ( )
inline

◆ extremeComp()

template<class t_comp_type , class t_value_type , bool t_is_min>
t_comp_type extremeComp ( ) const
inlinenodiscard

◆ extremeValue()

template<class t_comp_type , class t_value_type , bool t_is_min>
t_value_type extremeValue ( ) const
inlinenodiscard

◆ insert()

template<class t_comp_type , class t_value_type , bool t_is_min>
void insert ( t_comp_type comparison,
t_value_type value )
inline

◆ popExtreme()

template<class t_comp_type , class t_value_type , bool t_is_min>
t_value_type popExtreme ( )
inlinenodiscard

◆ replaceExtreme()

template<class t_comp_type , class t_value_type , bool t_is_min>
t_value_type replaceExtreme ( t_comp_type comparison,
t_value_type value ) const
inlinenodiscard

◆ size()

template<class t_comp_type , class t_value_type , bool t_is_min>
uint04 size ( ) const
inlinenodiscard

◆ sortedIndices()

template<class t_comp_type , class t_value_type , bool t_is_min>
Buffer< t_value_type > sortedIndices ( ) const
inlinenodiscard

◆ sortedValues()

template<class t_comp_type , class t_value_type , bool t_is_min>
Buffer< std::pair< t_value_type, t_comp_type > > sortedValues ( ) const
inlinenodiscard

◆ values() [1/2]

template<class t_comp_type , class t_value_type , bool t_is_min>
Buffer< std::pair< t_value_type, t_comp_type > > & values ( )
inlinenodiscard

◆ values() [2/2]

template<class t_comp_type , class t_value_type , bool t_is_min>
const Buffer< std::pair< t_value_type, t_comp_type > > & values ( ) const
inlinenodiscard

The documentation for this class was generated from the following file: