#include <priorityqueue.h>
Classes | |
struct | Element |
Public Member Functions | |
Index | getIndex (int i) const |
int | getNofElements () const |
Weight | getTopWeight () const |
Weight | getWeight (int i) const |
HeapMaxPriorityQueue (void) | |
void | init () |
void | insert (Index index, Weight weight) |
bool | isFull () const |
void | setMaxSize (int maxSize) |
void | sort (bool ascending=true) |
~HeapMaxPriorityQueue () | |
Protected Attributes | |
int | mCount |
Element * | mElements |
int | mMaxSize |
Element * | mpOffsetedElements |
Private Attributes | |
struct { | |
} | greaterElement |
struct { | |
} | lessElement |
Implements a bounded-size max priority queue using a heap
Definition at line 34 of file priorityqueue.h.
vcg::HeapMaxPriorityQueue< Index, Weight >::HeapMaxPriorityQueue | ( | void | ) | [inline] |
Definition at line 64 of file priorityqueue.h.
vcg::HeapMaxPriorityQueue< Index, Weight >::~HeapMaxPriorityQueue | ( | ) | [inline] |
Definition at line 70 of file priorityqueue.h.
Index vcg::HeapMaxPriorityQueue< Index, Weight >::getIndex | ( | int | i | ) | const [inline] |
Definition at line 98 of file priorityqueue.h.
int vcg::HeapMaxPriorityQueue< Index, Weight >::getNofElements | ( | ) | const [inline] |
returns number of elements inserted in queue
Definition at line 95 of file priorityqueue.h.
Weight vcg::HeapMaxPriorityQueue< Index, Weight >::getTopWeight | ( | ) | const [inline] |
Definition at line 100 of file priorityqueue.h.
Weight vcg::HeapMaxPriorityQueue< Index, Weight >::getWeight | ( | int | i | ) | const [inline] |
Definition at line 97 of file priorityqueue.h.
void vcg::HeapMaxPriorityQueue< Index, Weight >::init | ( | ) | [inline] |
Definition at line 89 of file priorityqueue.h.
void vcg::HeapMaxPriorityQueue< Index, Weight >::insert | ( | Index | index, |
Weight | weight | ||
) | [inline] |
Definition at line 102 of file priorityqueue.h.
bool vcg::HeapMaxPriorityQueue< Index, Weight >::isFull | ( | ) | const [inline] |
Definition at line 91 of file priorityqueue.h.
void vcg::HeapMaxPriorityQueue< Index, Weight >::setMaxSize | ( | int | maxSize | ) | [inline] |
Definition at line 77 of file priorityqueue.h.
void vcg::HeapMaxPriorityQueue< Index, Weight >::sort | ( | bool | ascending = true | ) | [inline] |
Definition at line 145 of file priorityqueue.h.
struct { ... } vcg::HeapMaxPriorityQueue< Index, Weight >::greaterElement [private] |
struct { ... } vcg::HeapMaxPriorityQueue< Index, Weight >::lessElement [private] |
int vcg::HeapMaxPriorityQueue< Index, Weight >::mCount [protected] |
Definition at line 155 of file priorityqueue.h.
Element* vcg::HeapMaxPriorityQueue< Index, Weight >::mElements [protected] |
Definition at line 157 of file priorityqueue.h.
int vcg::HeapMaxPriorityQueue< Index, Weight >::mMaxSize [protected] |
Definition at line 156 of file priorityqueue.h.
Element* vcg::HeapMaxPriorityQueue< Index, Weight >::mpOffsetedElements [protected] |
Definition at line 158 of file priorityqueue.h.