Public Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes
BucketPrioQueue Class Reference

Priority queue for integer coordinates with squared distances as priority. More...

#include <bucketedqueue.h>

List of all members.

Public Member Functions

 BucketPrioQueue ()
 Standard constructor.
bool empty ()
 Checks whether the Queue is empty.
INTPOINT pop ()
 return and pop the element with the lowest squared distance */
void push (int prio, INTPOINT t)
 push an element

Static Private Member Functions

static void initSqrIndices ()

Private Attributes

std::vector< std::queue
< INTPOINT > > 
buckets
int count
int nextBucket

Static Private Attributes

static int numBuckets
static std::vector< int > sqrIndices

Detailed Description

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).

Definition at line 19 of file bucketedqueue.h.


Constructor & Destructor Documentation

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...

Definition at line 11 of file bucketedqueue.cpp.


Member Function Documentation

Checks whether the Queue is empty.

Definition at line 24 of file bucketedqueue.cpp.

void BucketPrioQueue::initSqrIndices ( ) [static, private]

Definition at line 63 of file bucketedqueue.cpp.

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

Definition at line 46 of file bucketedqueue.cpp.

void BucketPrioQueue::push ( int  prio,
INTPOINT  t 
)

push an element

Definition at line 29 of file bucketedqueue.cpp.


Member Data Documentation

Definition at line 42 of file bucketedqueue.h.

int BucketPrioQueue::count [private]

Definition at line 39 of file bucketedqueue.h.

Definition at line 40 of file bucketedqueue.h.

int BucketPrioQueue::numBuckets [static, private]

Definition at line 38 of file bucketedqueue.h.

std::vector< int > BucketPrioQueue::sqrIndices [static, private]

Definition at line 37 of file bucketedqueue.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines


dynamicvoronoi
Author(s): Boris Lau, Christoph Sprunk, Wolfram Burgard
autogenerated on Wed Dec 26 2012 16:35:03