MultiAgentDecisionProcess  Release 0.2.1
FixedCapacityPriorityQueue< T > Class Template Reference

FixedCapacityPriorityQueue is a class that represents a priority queue with a fixed size. More...

#include <FixedCapacityPriorityQueue.h>

+ Inheritance diagram for FixedCapacityPriorityQueue< T >:

Public Member Functions

T & back ()
bool empty () const
 FixedCapacityPriorityQueue (size_t capacity)
 (default) Constructor
bool insert (T &a, T &overflown_T)
 inserts a in the priority q.
void pop ()
size_t size () const
T & top ()

Private Attributes

size_t _m_capacity
std::list< T > _m_l

Detailed Description

template<class T>
class FixedCapacityPriorityQueue< T >

FixedCapacityPriorityQueue is a class that represents a priority queue with a fixed size.

-all overflowed items are returned, such that the user can delete them

TODO: fill out...

Definition at line 43 of file FixedCapacityPriorityQueue.h.

Constructor & Destructor Documentation

template<class T>
FixedCapacityPriorityQueue< T >::FixedCapacityPriorityQueue ( size_t  capacity)
inline

(default) Constructor

Definition at line 56 of file FixedCapacityPriorityQueue.h.

Member Function Documentation

template<class T>
T& FixedCapacityPriorityQueue< T >::back ( )
inline

Definition at line 83 of file FixedCapacityPriorityQueue.h.

template<class T>
bool FixedCapacityPriorityQueue< T >::empty ( ) const
inline
template<class T>
bool FixedCapacityPriorityQueue< T >::insert ( T &  a,
T &  overflown_T 
)

inserts a in the priority q.

returns true if the capacity overflows in this case, overflown_T is set to the overflown value (which can then be recovered or deleted by the user).

Definition at line 90 of file FixedCapacityPriorityQueue.h.

Referenced by BGIPSolution::AddSolution().

template<class T>
void FixedCapacityPriorityQueue< T >::pop ( )
inline
template<class T>
size_t FixedCapacityPriorityQueue< T >::size ( ) const
inline

Definition at line 85 of file FixedCapacityPriorityQueue.h.

Referenced by BGIPSolution::GetNrFoundSolutions().

template<class T>
T& FixedCapacityPriorityQueue< T >::top ( )
inline

Member Data Documentation

template<class T>
size_t FixedCapacityPriorityQueue< T >::_m_capacity
private

Definition at line 47 of file FixedCapacityPriorityQueue.h.


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