CoMMA 1.3.2
A geometric agglomerator for unstructured meshes
Loading...
Searching...
No Matches
comma::Queue< T > Class Template Reference

A template class implementing a custom queue data structure. More...

#include <Queue.h>

Public Member Functions

 Queue ()=default
 Constructor. More...
 
 ~Queue ()=default
 Destructor. More...
 
void push (T const &elem)
 Push an element on the top of the queue. More...
 
pop ()
 pop an element from the bottom of the queue More...
 
top () const
 Scope to the element on the bottom of the queue. More...
 
bool empty () const
 Whether the queue is empty. More...
 

Detailed Description

template<typename T>
class comma::Queue< T >

A template class implementing a custom queue data structure.

Template Parameters
TType of the elements

Constructor & Destructor Documentation

◆ Queue()

template<typename T >
comma::Queue< T >::Queue ( )
default

Constructor.

◆ ~Queue()

template<typename T >
comma::Queue< T >::~Queue ( )
default

Destructor.

Member Function Documentation

◆ empty()

template<typename T >
bool comma::Queue< T >::empty ( ) const
inline

Whether the queue is empty.

Returns
a bool

◆ pop()

template<typename T >
T comma::Queue< T >::pop ( )
inline

pop an element from the bottom of the queue

Returns
The element popped

◆ push()

template<typename T >
void comma::Queue< T >::push ( T const &  elem)
inline

Push an element on the top of the queue.

Parameters
elemThe element to add

◆ top()

template<typename T >
T comma::Queue< T >::top ( ) const
inline

Scope to the element on the bottom of the queue.

Returns
The bottom element of the queue

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