C3D Toolkit  Kernel - 117982, Vision - 2.9.2.2
PriorityQueue< Index, Weight > Class Template Reference

Priority queue using a heap. More...

#include <templ_kdtree.h>

+ Collaboration diagram for PriorityQueue< Index, Weight >:

Classes

struct  Element
 < Element of queue. More...
 

Public Member Functions

 PriorityQueue ()
 Constructor.
 
 ~PriorityQueue ()
 Destructor.
 
Functions of priority queue.
bool Initialize (size_t _maxSize)
 Initialize the queue by number of elements.
 
size_t ElementsCount () const
 Get elements count in the queue.
 
Weight GetWeight (size_t i) const
 Get weight of element in the queue.
 
Index GetIndex (size_t i) const
 Get index of element in the queue.
 
Weight GetTopWeight () const
 Get weight of the top element in the queue.
 
void Insert (Index index, Weight weight)
 Insert element with given index and weight in the queue.
 

Protected Attributes

Elementelements
 Elements of queue.
 
ElementoffsetedElements
 Shifted elements of queue.
 
size_t count
 Actual count of elements in the queue.
 
size_t maxSize
 Maximal count of elements in the queue.
 

Detailed Description

template<class Index, class Weight>
class PriorityQueue< Index, Weight >

Priority queue using a heap.

Priority queue using a heap. Size of queue is fixed. This implementation perfomance is better in comparsion with std::priority_queue.


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