vigra - ChangeablePriorityQueue< T, COMPARE > Class Template Reference

[ 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

## Detailed Description

### template<class T, class COMPARE = std::less<T>>
class vigra::ChangeablePriorityQueue< T, COMPARE >

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

## Member Function Documentation

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

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

- vigra/priority_queue.hxx

© Ullrich Köthe (ullrich.koethe@iwr.uni-heidelberg.de) Heidelberg Collaboratory for Image Processing, University of Heidelberg, Germany | html generated using doxygen and Python vigra 1.11.0 (Thu Mar 17 2016)