Developer Documentation
RAVL, Recognition And Vision Library
USER HOME PAGE CLASS LIST CONTENTS
Ravl - Core - Queues - PriQueueLC<class K,class D>
 

  PUBLIC
PriQueueLC::PriQueueLC(void)
PriQueueLC::IsElm(void) const
PriQueueLC::IsEmpty(void) const
PriQueueLC::Top(void)
PriQueueLC::Top(void) const
PriQueueLC::TopKey(void) const
PriQueueLC::DelTop(void)
PriQueueLC::GetTopPair(void)
PriQueueLC::GetTop(void)
PriQueueLC::Insert(const K &,const D &)
PriQueueLC::Insert(Tuple2C &)
PriQueueLC::Remove(const Tuple2C &)
PriQueueLC::Remove(const K &)
PriQueueLC::Size(void) const
PriQueueLC::Dump(HeapNodeC *,int)
PriQueueLC::Empty(void)
RCHandleC::operator =(const RCHandleC &)
RCHandleC::DeepCopy(UIntT) const
RCHandleC::operator ==(const RCHandleC &) const
RCHandleC::operator !=(const RCHandleC &) const
RCHandleC::Hash(void) const
RCHandleC::IsValid(void) const
RCHandleC::Invalidate(void)
RCHandleC::IsHandleType(const DT &) const
RCHandleC::CheckHandleType(const DT &) const
RCHandleC::Body(void)
RCHandleC::Body(void) const
RCHandleC::References(void) const
RCHandleC::operator <<(ostream &,const RCHandleC &)
RCHandleC::operator >>(istream &,RCHandleC &)

   PriQueueLC<class K,class D>   
 
Pointer based version of Priority Queue.
 
include "Ravl/PriQueueL.hh"
Created:28/10/96 
Source file:Ravl/Core/Container/Queue/PriQueueL.hh
User Level:Normal
Library:RavlCore
Example:TPriQ.cc
In Scope:RavlN

Comments:
It is faster to use plain PriQueueC if you know the maximum size of the queue before its constructed.

 Notes:
   This is a BIG OBJECT.
   Keys must have operation '<' defined.
   This queue assumes: **** Small numbers == High priority. ****
 
The order in which items of equal priority are retrieved should be treated as 'unknown'.

Parent Classes: Methods:
PriQueueLC()
Default constructor.

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

bool IsEmpty() const
Is the queue empty ?

D & Top()
Look/Modify data on top of queue.

const D & Top() const
Look at data on top of queue.

const K & TopKey() const
Look at key on top of queue.

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

Tuple2C<K,D> & GetTopPair()
Get Key/Data pair from queue.
WARNING: For advanced users only. !! Users responsability to delete returned info after use. !!

D GetTop()
Get Data from top of queue.

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

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

bool Remove(const Tuple2C<K,D> & old)
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

int Size() const
Get number of items in queue. Slow !!!

void Dump(HeapNodeC<K,D> * Place = 0,int level = 0)
Dump to stdout

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

#include "Ravl/RefCounter.hh"
const RCHandleC<PriQueueLBodyC<K,D>> & operator =(const RCHandleC<PriQueueLBodyC<K,D>> & oth)
Assign handle.

RCHandleC<PriQueueLBodyC<K,D>> DeepCopy(UIntT levels = ((UIntT))) const
Do a deep copy of the object.

bool operator ==(const RCHandleC<PriQueueLBodyC<K,D>> & oth) const
Are handles to the same object ?

bool operator !=(const RCHandleC<PriQueueLBodyC<K,D>> & oth) const
Are handles to different objects ?

UIntT Hash() const
Default hash function.
This hashes on the address of the body.

bool IsValid() const
Test if this is a valid handle.

void Invalidate()
Invalidate this handle.
Unattaches the body from the handle.

bool IsHandleType(const DT &) const
Is handle of given type ?

void CheckHandleType(const DT & dummy) const
Check handle type. Throw an expception if not.

PriQueueLBodyC<K,D> & Body()
Access body of object.

const PriQueueLBodyC<K,D> & Body() const
Constant access to body of object.

UIntT References() const
Find the number of references to the body of this object.

ostream & operator <<(ostream & strm,const RCHandleC<PriQueueLBodyC<K,D>> & obj)

istream & operator >>(istream & strm,RCHandleC<PriQueueLBodyC<K,D>> & obj)


Maintainer:Charles Galambos, Created: 28/10/96, Documentation by CxxDoc: Tue Aug 13 09:59:30 2002