goblinQueue Class Template Reference
[Container Objects]

Interface class for container objects. More...

#include <goblinQueue.h>

Inheritance diagram for goblinQueue:

managedObject goblinRootObject basicHeap binaryHeap dynamicQueue dynamicStack fibonacciHeap sequentialQueueAdapter sequentialStackAdapter staticQueue staticStack

Public Member Functions

virtual unsigned long Size () const =0 throw ()
virtual void Insert (TItem w, TKey alpha)=0 throw (ERRange,ERRejected,ERCheck)
virtual TItem Delete ()=0 throw (ERRejected)
virtual void ChangeKey (TItem w, TKey alpha)=0 throw (ERRange,ERRejected)
virtual TItem Peek () const =0 throw (ERRejected)
virtual bool Empty () const =0 throw ()
virtual void Init ()=0 throw ()
virtual TItem Cardinality () const =0 throw ()

Detailed Description

template<class TItem, class TKey>
class goblinQueue< TItem, TKey >

Interface class for container objects.


Member Function Documentation

virtual TItem Cardinality  )  const throw () [pure virtual]
 

Query the current queue cardinality.

Returns:
The queue cardinality

Implemented in basicHeap, binaryHeap, dynamicQueue, dynamicStack, fibonacciHeap, sequentialQueueAdapter, sequentialStackAdapter, staticQueue, staticStack, dynamicStack< TNode >, staticQueue< TNode >, staticQueue< TArc >, and staticStack< TNode >.

virtual void ChangeKey TItem  w,
TKey  alpha
throw (ERRange,ERRejected) [pure virtual]
 

Insert an index into the queue.

Parameters:
w An element index
alpha A new priority for this element

Implemented in basicHeap, binaryHeap, dynamicQueue, dynamicStack, fibonacciHeap, staticQueue, and staticStack.

virtual TItem Delete  )  throw (ERRejected) [pure virtual]
 

Delete an element from the queue.

Returns:
The index of the deleted element

Implemented in basicHeap, binaryHeap, dynamicQueue, dynamicStack, fibonacciHeap, sequentialQueueAdapter, sequentialStackAdapter, staticQueue, staticStack, dynamicStack< TNode >, staticQueue< TNode >, staticQueue< TArc >, and staticStack< TNode >.

virtual bool Empty  )  const throw () [pure virtual]
 

Check if the queue is empty.

Return values:
true The queue is empty

Implemented in basicHeap, binaryHeap, dynamicQueue, dynamicStack, fibonacciHeap, sequentialQueueAdapter, sequentialStackAdapter, staticQueue, staticStack, dynamicStack< TNode >, staticQueue< TNode >, staticQueue< TArc >, and staticStack< TNode >.

virtual void Init  )  throw () [pure virtual]
 

Delete all elements from the queue efficently.

Implemented in basicHeap, binaryHeap, dynamicQueue, dynamicStack, fibonacciHeap, staticQueue, staticStack, dynamicStack< TNode >, staticQueue< TNode >, staticQueue< TArc >, and staticStack< TNode >.

virtual void Insert TItem  w,
TKey  alpha
throw (ERRange,ERRejected,ERCheck) [pure virtual]
 

Insert an index into the queue.

Parameters:
w The index to be inserted
alpha The priority of the inserted index

Implemented in basicHeap, binaryHeap, dynamicQueue, dynamicStack, fibonacciHeap, sequentialQueueAdapter, sequentialStackAdapter, staticQueue, and staticStack.

virtual TItem Peek  )  const throw (ERRejected) [pure virtual]
 

Query what is coming next on the queue.

Returns:
The index of the element to be deleted next

Implemented in basicHeap, binaryHeap, dynamicQueue, dynamicStack, fibonacciHeap, sequentialQueueAdapter, sequentialStackAdapter, staticQueue, staticStack, dynamicStack< TNode >, staticQueue< TNode >, staticQueue< TArc >, and staticStack< TNode >.

virtual unsigned long Size  )  const throw () [pure virtual]
 

Implements goblinRootObject.

Implemented in basicHeap, binaryHeap, dynamicQueue, dynamicStack, fibonacciHeap, sequentialQueueAdapter, sequentialStackAdapter, staticQueue, staticStack, dynamicStack< TNode >, staticQueue< TNode >, staticQueue< TArc >, and staticStack< TNode >.