User Documentation
RAVL, Recognition And Vision Library
DEVELOP HOME PAGE CLASS LIST CONTENTS
Ravl - Core - Queues - PriQueueC<class K,class D>
 

  PUBLIC
PriQueueC::PriQueueC(UIntT)
PriQueueC::PriQueueC(const PriQueueC &)
PriQueueC::IsElm(void) const
PriQueueC::IsEmpty(void) const
PriQueueC::Top(void)
PriQueueC::Top(void) const
PriQueueC::TopKey(void) const
PriQueueC::DelTop(void)
PriQueueC::GetTopPair(void)
PriQueueC::GetTop(void)
PriQueueC::Insert(const K &,const D &)
PriQueueC::Insert(const Tuple2C &)
PriQueueC::Remove(const Tuple2C &)
PriQueueC::Remove(const K &)
PriQueueC::Size(void) const
PriQueueC::Empty(void)
PriQueueC::Check(void)

   PriQueueC<class K,class D>   
 
Fixed size priority queue.
 
include "Ravl/PriQueue.hh"
Created:24/08/98 
User Level:Normal
Library:RavlCore
Example:TPriQH.cc
In Scope:RavlN

Comments:
Priority queue implemented in a fixed size array.

BIG OBJECT

 Keys must have operation '<' defined.
 This queue assumes: **** Small numbers == High priority. ****
 

Variables:
Methods:
PriQueueC(UIntT initSize = 32)
Default constructor.

PriQueueC(const PriQueueC<K,D> & body)
Copy constructor.

bool IsElm(void) const
Does the queue contains any items ?

bool IsEmpty(void) const
Is the queue empty ?

D & Top(void)
Look/Modify data on top of queue.
Reference not garanteed to stay valid after any insert/delete operation !

const D & Top(void) const
Look at data on top of queue.
Reference not garanteed to stay valid after any insert/delete operation !

const K & TopKey(void) const
Look at key on top of queue.
Reference not garanteed to stay valid after any insert/delete operation !

void DelTop(void)
Delete item on top of queue.
NB. IsElm(), must be true before calling this.

Tuple2C<K,D> GetTopPair(void)
Get Key/Data pair from queue.

D GetTop(void)
Get Data from top of queue.

void Insert(const K & Key,const D & Data)
Insert Data/Key into queue.

void Insert(const Tuple2C<K,D> & dat)
Insert Data/Key into queue.

bool Remove(const Tuple2C<K,D> & New)
Remove all instances of Key from queue.
Returns True if found.
BUG: NOT IMPLEMENTED

bool Remove(const K & Key)
Remove all instances of Key from queue.
Returns True if found.
BUG: NOT IMPLEMENTED

UIntT Size(void) const
Get number of items in queue.

void Empty(void)
Empty the queue of all its contents.

bool Check()
Check consistancy.


Maintainer:Charles Galambos, Created: 24/08/98, Documentation by CxxDoc: Tue Aug 13 09:59:02 2002