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

details PriorityQueue< ValueType, PriorityType, Ascending > Class Template Reference VIGRA

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

#include <vigra/priority_queue.hxx>

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. More...
 
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 accepts 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/priority_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:

© 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.1 (Fri May 19 2017)