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

A heap data structure that takes the form of a binary tree which is a common way of implementing priority queues. More...

#include <BinaryHeap.hpp>

Public Member Functions

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

Detailed Description

template<class t_comp_type, class t_value_type, bool t_is_min>
class NDEVR::BinaryHeap< t_comp_type, t_value_type, t_is_min >

A heap data structure that takes the form of a binary tree which is a common way of implementing priority queues.


Constructor & Destructor Documentation

◆ BinaryHeap()

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

Member Function Documentation

◆ clear()

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

◆ 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

◆ 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

◆ 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: