[ VIGRA Homepage | Function Index | Class Index | Namespaces | File List | Main Page ]
![]() |
MappedBucketQueue< ValueType, PriorityFunctor, Ascending > | ![]() |
Priority queue implemented using bucket sort (STL compatible). More...
#include <vigra/bucket_queue.hxx>
Public Member Functions | |
MappedBucketQueue (unsigned int bucket_count=256, PriorityFunctor const &priority=PriorityFunctor()) | |
Create a queue with. | |
void | push (value_type const &v) |
Insert new element. |
Priority queue implemented using bucket sort (STL compatible).
This template is compatible to std::priority_queue
, but uses a more efficient algorithm based on bucket sort. It us used like vigra::BucketQueue, but has an additional PriorityFunctor
which extracts the priority value of an element of type ValueType
. Thus functor is called within push
so that it does not need an extra argument.
#include <vigra/bucket_queue.hxx>
Namespace: vigra
MappedBucketQueue | ( | unsigned int | bucket_count = 256 , |
|
PriorityFunctor const & | priority = PriorityFunctor() | |||
) |
Create a queue with.
PriorityFunctor
given in priority(v)
must result in an integer, where v
is an instance of ValueType
). void push | ( | value_type const & | v | ) |
Insert new element.
priority(v)
, where priority
is an instance of the PriorityFunctor
passed in the constructor. If the priority is outside the range [0, ..., bucket_count-1]
, it is clamped to the range borders.
© Ullrich Köthe (ullrich.koethe@iwr.uni-heidelberg.de) |
html generated using doxygen and Python
|