[ VIGRA Homepage | Function Index | Class Index | Namespaces | File List | Main Page ]

| PriorityQueue< ValueType, PriorityType, Ascending > Class Template Reference |

Heap-based priority queue compatible to BucketQueue. More...

`#include <vigra/bucket_queue.hxx>`

List of all members.

## Public Member Functions
bool | empty () const
| Queue contains no elements. Equivalent to `size() == 0`.
priority_type | maxIndex () const
| Maximum index (i.e. priority) allowed in this queue. Equivalent to `bucket_count - 1`.
void | pop ()
| Remove the current top element.
| PriorityQueue ()
| Create empty priority queue.
void | push (value_type const &v, priority_type priority)
| Insert new element.
size_type | size () const
| Number of elements in this queue.
const_reference | top () const
| The current top element.
priority_type | topPriority () const
| Priority of the current top element.

## Detailed Description

### template<class ValueType, class PriorityType, bool Ascending = false>
class vigra::PriorityQueue< ValueType, PriorityType, Ascending >

Heap-based priority queue compatible to BucketQueue.

This template is compatible to vigra::BucketQueue, but except arbitrary priority types. Internally, it uses a `std::priority_queue`, but implements an API where priorities and payload data are separate, like in vigra::BucketQueue.

#include <vigra/bucket_queue.hxx>
Namespace: vigra

## Member Function Documentation

void push | ( | value_type const & | v,
|  | priority_type | priority
| ) |  |

Insert new element.

- v with given
- priority.

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

- vigra/bucket_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.9.0 (Tue Nov 6 2012)