Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

PriorityQueue Class Reference

Priority Queue class - it's not feasible, in our case, to use a heap for this because we want to keep the n 'best' states, and this is something that a heap doesn't efficiently allow for. More...

#include <Prioritized_aux.h>

List of all members.

Public Member Functions

 PriorityQueue (int max)
 Create a new priority queue.

 ~PriorityQueue ()
 Destroy the queue.

void add2Queue (node *n, const double deltaNeighbour, int numPropagate)
 Add 'n' to our queue, sorting by the value of deltaNeighbour TODO: slow (but conveniently modular...).

bool empty ()
 Return true iff the queue is empty.

QueueEntrypop ()
 Pop the top state.

bool inQueue (const node *n)
 Return true iff n is queued.

void print ()

Public Attributes

unsigned int _maxEntries

Private Attributes

std::list< QueueEntry * > _entries


Detailed Description

Priority Queue class - it's not feasible, in our case, to use a heap for this because we want to keep the n 'best' states, and this is something that a heap doesn't efficiently allow for.

We also expect that these queues will be quite small (so try to win with hardware instead of algorithms).


Constructor & Destructor Documentation

PriorityQueue::PriorityQueue int  max  )  [inline]
 

Create a new priority queue.

PriorityQueue::~PriorityQueue  )  [inline]
 

Destroy the queue.


Member Function Documentation

void PriorityQueue::add2Queue node n,
const double  deltaNeighbour,
int  numPropagate
[inline]
 

Add 'n' to our queue, sorting by the value of deltaNeighbour TODO: slow (but conveniently modular...).

bool PriorityQueue::empty  )  [inline]
 

Return true iff the queue is empty.

bool PriorityQueue::inQueue const node n  )  [inline]
 

Return true iff n is queued.

QueueEntry* PriorityQueue::pop  )  [inline]
 

Pop the top state.

void PriorityQueue::print  )  [inline]
 


Member Data Documentation

std::list<QueueEntry*> PriorityQueue::_entries [private]
 

unsigned int PriorityQueue::_maxEntries
 


The documentation for this class was generated from the following file:
Generated on Tue Aug 18 03:44:53 2009 for HOG by doxygen 1.3.4