fiber
Loading...
Searching...
No Matches
fiber::PriorityQueue< T, N, greater_priority > Class Template Reference

#include <PriorityQueue.hpp>

Public Types

using comntainer_type = ArrayList<T, N>
 
using value_type = comntainer_type::value_type
 
using size_type = comntainer_type::size_type
 
using reference = comntainer_type::reference
 
using const_reference = comntainer_type::const_reference
 
using iterator = comntainer_type::iterator
 
using const_iterator = comntainer_type::const_iterator
 

Public Member Functions

constexpr PriorityQueue ()=default
 
constexpr PriorityQueue (const PriorityQueue &)=default
 
constexpr PriorityQueueoperator= (const PriorityQueue &)=default
 
constexpr size_type size () const
 returns the size/count of live elements in the container
 
constexpr size_type capacity () const
 returns the capacity of the container. Since this is a statically allocated container this is also the maximal size.
 
constexpr size_type max_size () const
 returns the maximal number of elements that can be stored in the container
 
constexpr size_type reserve () const
 returns the reserve - number of elements that can be stored until the container is full
 
constexpr bool empty () const
 returns true if there are not elements in the container, aka. the container is empty.
 
constexpr bool full () const
 returns true if the container is full and no more elements can be stored in the container
 
constexpr reference top ()
 returns a reference to the element with the top most priority
 
constexpr const_reference top () const
 returns a reference to the element with the top most priority
 
template<class... Args>
reference emplace (Args &&... args)
 
void pop ()
 
this pop ()
 

Public Attributes

value_type top_pop
 
return value
 

Member Typedef Documentation

◆ comntainer_type

template<class T, size_type N, class greater_priority>
using fiber::PriorityQueue< T, N, greater_priority >::comntainer_type = ArrayList<T, N>

◆ const_iterator

template<class T, size_type N, class greater_priority>
using fiber::PriorityQueue< T, N, greater_priority >::const_iterator = comntainer_type::const_iterator

◆ const_reference

template<class T, size_type N, class greater_priority>
using fiber::PriorityQueue< T, N, greater_priority >::const_reference = comntainer_type::const_reference

◆ iterator

template<class T, size_type N, class greater_priority>
using fiber::PriorityQueue< T, N, greater_priority >::iterator = comntainer_type::iterator

◆ reference

template<class T, size_type N, class greater_priority>
using fiber::PriorityQueue< T, N, greater_priority >::reference = comntainer_type::reference

◆ size_type

template<class T, size_type N, class greater_priority>
using fiber::PriorityQueue< T, N, greater_priority >::size_type = comntainer_type::size_type

◆ value_type

template<class T, size_type N, class greater_priority>
using fiber::PriorityQueue< T, N, greater_priority >::value_type = comntainer_type::value_type

Constructor & Destructor Documentation

◆ PriorityQueue() [1/2]

template<class T, size_type N, class greater_priority>
fiber::PriorityQueue< T, N, greater_priority >::PriorityQueue ( )
constexprdefault

◆ PriorityQueue() [2/2]

template<class T, size_type N, class greater_priority>
fiber::PriorityQueue< T, N, greater_priority >::PriorityQueue ( const PriorityQueue< T, N, greater_priority > & )
constexprdefault

Member Function Documentation

◆ capacity()

template<class T, size_type N, class greater_priority>
size_type fiber::PriorityQueue< T, N, greater_priority >::capacity ( ) const
inlineconstexpr

returns the capacity of the container. Since this is a statically allocated container this is also the maximal size.

◆ emplace()

template<class T, size_type N, class greater_priority>
template<class... Args>
reference fiber::PriorityQueue< T, N, greater_priority >::emplace ( Args &&... args)
inline

◆ empty()

template<class T, size_type N, class greater_priority>
bool fiber::PriorityQueue< T, N, greater_priority >::empty ( ) const
inlineconstexpr

returns true if there are not elements in the container, aka. the container is empty.

◆ full()

template<class T, size_type N, class greater_priority>
bool fiber::PriorityQueue< T, N, greater_priority >::full ( ) const
inlineconstexpr

returns true if the container is full and no more elements can be stored in the container

◆ max_size()

template<class T, size_type N, class greater_priority>
size_type fiber::PriorityQueue< T, N, greater_priority >::max_size ( ) const
inlineconstexpr

returns the maximal number of elements that can be stored in the container

◆ operator=()

template<class T, size_type N, class greater_priority>
PriorityQueue & fiber::PriorityQueue< T, N, greater_priority >::operator= ( const PriorityQueue< T, N, greater_priority > & )
constexprdefault

◆ pop() [1/2]

template<class T, size_type N, class greater_priority>
void fiber::PriorityQueue< T, N, greater_priority >::pop ( )
inline

◆ pop() [2/2]

template<class T, size_type N, class greater_priority>
this fiber::PriorityQueue< T, N, greater_priority >::pop ( )

◆ reserve()

template<class T, size_type N, class greater_priority>
size_type fiber::PriorityQueue< T, N, greater_priority >::reserve ( ) const
inlineconstexpr

returns the reserve - number of elements that can be stored until the container is full

◆ size()

template<class T, size_type N, class greater_priority>
size_type fiber::PriorityQueue< T, N, greater_priority >::size ( ) const
inlineconstexpr

returns the size/count of live elements in the container

◆ top() [1/2]

template<class T, size_type N, class greater_priority>
reference fiber::PriorityQueue< T, N, greater_priority >::top ( )
inlineconstexpr

returns a reference to the element with the top most priority

◆ top() [2/2]

template<class T, size_type N, class greater_priority>
const_reference fiber::PriorityQueue< T, N, greater_priority >::top ( ) const
inlineconstexpr

returns a reference to the element with the top most priority

Member Data Documentation

◆ top_pop

template<class T, size_type N, class greater_priority>
value_type fiber::PriorityQueue< T, N, greater_priority >::top_pop
inline
Initial value:
{
value_type value = std::move(this->top())
constexpr reference top()
returns a reference to the element with the top most priority
Definition PriorityQueue.hpp:54
comntainer_type::value_type value_type
Definition PriorityQueue.hpp:24
return value
Definition PriorityQueue.hpp:87

◆ value

template<class T, size_type N, class greater_priority>
return fiber::PriorityQueue< T, N, greater_priority >::value

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