Priority queue for integer coordinates with squared distances as priority. More...
#include <bucketedqueue.h>
Public Member Functions | |
BucketPrioQueue () | |
Standard constructor. | |
void | clear () |
bool | empty () |
Checks whether the Queue is empty. | |
int | getNumBuckets () |
T | pop () |
return and pop the element with the lowest squared distance */ | |
void | push (int prio, T t) |
push an element | |
int | size () |
Private Types | |
typedef std::map< int, std::queue< T > > | BucketType |
Private Attributes | |
BucketType | buckets |
int | count |
BucketType::iterator | nextPop |
Priority queue for integer coordinates with squared distances as priority.
dynamicEDT3D: A library for incrementally updatable Euclidean distance transforms in 3D.
Definition at line 57 of file bucketedqueue.h.
typedef std::map< int, std::queue<T> > BucketPrioQueue< T >::BucketType [private] |
Definition at line 82 of file bucketedqueue.h.
BucketPrioQueue< T >::BucketPrioQueue | ( | ) |
Standard constructor.
Standard constructor. When called for the first time it creates a look up table that maps square distanes to bucket numbers, which might take some time...
void BucketPrioQueue< T >::clear | ( | ) | [inline] |
Definition at line 66 of file bucketedqueue.h.
bool BucketPrioQueue< T >::empty | ( | ) |
Checks whether the Queue is empty.
int BucketPrioQueue< T >::getNumBuckets | ( | ) | [inline] |
Definition at line 76 of file bucketedqueue.h.
T BucketPrioQueue< T >::pop | ( | ) |
return and pop the element with the lowest squared distance */
void BucketPrioQueue< T >::push | ( | int | prio, |
T | t | ||
) |
push an element
int BucketPrioQueue< T >::size | ( | ) | [inline] |
Definition at line 75 of file bucketedqueue.h.
BucketType BucketPrioQueue< T >::buckets [private] |
Definition at line 83 of file bucketedqueue.h.
int BucketPrioQueue< T >::count [private] |
Definition at line 80 of file bucketedqueue.h.
BucketType::iterator BucketPrioQueue< T >::nextPop [private] |
Definition at line 84 of file bucketedqueue.h.