|
C3D Toolkit
Kernel - 118060, Vision - 2.15.0.1825
|
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 | |
| Element * | elements |
| Elements of queue. | |
| Element * | offsetedElements |
| Shifted elements of queue. | |
| size_t | count |
| Actual count of elements in the queue. | |
| size_t | maxSize |
| Maximal count of elements in the queue. | |
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.