[ VIGRA Homepage | Function Index | Class Index | Namespaces | File List | Main Page ]
ChangeablePriorityQueue< T, COMPARE > Class Template Reference |
Heap-based changable priority queue with a maximum number of elemements. More...
#include <vigra/priority_queue.hxx>
Public Member Functions | |
ChangeablePriorityQueue (const size_t maxSize) | |
Create an empty ChangeablePriorityQueue which can contain atmost maxSize elements. | |
void | changePriority (const value_type i, const priority_type p) |
change priority of a given index. The index must be in the queue! Call push to auto insert / change . | |
void | clear () |
check if the PQ is empty | |
bool | contains (const int i) const |
check if i is an index on the PQ | |
void | deleteItem (const value_type i) |
deleqte the priority associated with index i | |
bool | empty () const |
check if the PQ is empty | |
void | pop () |
Remove the current top element. | |
priority_type | priority (const value_type i) const |
returns the value associated with index i | |
void | push (const value_type i, const priority_type p) |
Insert a index with a given priority. More... | |
int | size () const |
return the number of elements in the PQ | |
const_reference | top () const |
get index with top priority | |
priority_type | topPriority () const |
get top priority | |
Heap-based changable priority queue with a maximum number of elemements.
This pq allows to change the priorities of elements in the queue
#include <vigra/priority_queue.hxx>
Namespace: vigra
void push | ( | const value_type | i, |
const priority_type | p | ||
) |
Insert a index with a given priority.
If the queue contains i bevore this call the priority of the given index will be changed
© Ullrich Köthe (ullrich.koethe@iwr.uni-heidelberg.de) |
html generated using doxygen and Python
|