Template Class BucketPrioQueue

Class Documentation

template<typename T>
class BucketPrioQueue

Priority queue for integer coordinates with squared distances as priority.

A priority queue that uses buckets to group elements with the same priority. The individual buckets are unsorted, which increases efficiency if these groups are large. The elements are assumed to be integer coordinates, and the priorities are assumed to be squared Euclidean distances (integers).

Public Functions

BucketPrioQueue()

Standard constructor.

Standard constructor. When called for the first time it creates a look up table that maps square distances to bucket numbers, which might take some time…

inline void clear()
bool empty()

Checks whether the Queue is empty.

void push(int prio, T t)

push an element

T pop()

return and pop the element with the lowest squared distance */

inline int size()
inline int getNumBuckets()
inline int getTopPriority()