|
|||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--giden.GRDS.PriorityQueue
Copyright (c) 1993-2004 C. R. Coullard, D. S. Dilworth, J. H. Owen,
All Rights Reserved.
We make no representations or warranties about the suitability of
the software, either express or implied, including but not limited
to the implied warranties of merchantability, fitness for a
particular purpose, or non-infringement. We shall not be liable for
any damages suffered by user as a result of using, modifying or
distributing this software or its derivatives.
PriorityQueue (PQ) is a class that stores objects with associated integer values. Objects can be retrieved from the PQ sorted by the integer value (smallest to largest). The integer value associated with an object can be decreased.
PriorityQueue is an abstract base class, and hence can not be directly created. Currently GIDEN only supports the PQList priority queue that is derived from the PriorityQueue class. Other types of PQ classes (e.g. PQHeap) may be developed in the future and they will use a similar (if not identical) set of interface methods and parameters.
Copyright (c) 1993-2003 C. R. Coullard, D. S. Dilworth, J. H. Owen, All Rights Reserved.
Network
,
Queue
,
BoundedQueue
,
LinkList
,
PQList
Constructor Summary | |
PriorityQueue()
Creates a Priority Queue (PQ) |
Method Summary | |
void |
DecreaseValue(java.lang.Object item,
int value)
Decreases the value of the item |
Edge |
DeleteMinEdge()
Deletes the edge with the smallest value |
Node |
DeleteMinNode()
Deletes the node with the smallest value |
Edge |
GetMinEdge()
Gets the edge with the smallest value |
Node |
GetMinNode()
Gets the node with the smallest value |
int |
GetSize()
Gets the number of elements in this PQ |
void |
Insert(java.lang.Object item,
int value)
Inserts the object with its value into this PQ |
boolean |
IsEmpty()
Tests if this PQ is empty |
boolean |
IsMember(java.lang.Object object)
Test if the object is a member of this PQ |
boolean |
NotEmpty()
Test if the PQ is not empty |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public PriorityQueue()
Method Detail |
public void Insert(java.lang.Object item, int value)
item
- The item to insertvalue
- The value to assign to the itempublic int GetSize()
public boolean IsEmpty()
NotEmpty()
public boolean NotEmpty()
IsEmpty()
public Node GetMinNode()
DeleteMinNode()
public Node DeleteMinNode()
GetMinNode()
public Edge GetMinEdge()
DeleteMinEdge()
public Edge DeleteMinEdge()
GetMinEdge()
public boolean IsMember(java.lang.Object object)
object
- The object to testpublic void DecreaseValue(java.lang.Object item, int value)
item
- The item whose value is to be changedvalue
- The new value for the item
|
|||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |