|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object | +--PQ
A priority queue for GraphNodes. Priority is based on the
cost field for a GraphNode.
Queue| Constructor Summary | |
PQ(int maxN)
Constructs a PQ with a max maxN amount of GraphNodes. |
|
| Method Summary | |
void |
PQdec(int key,
double cost)
Decrements the cost of a GraphNode in this PQ. |
GraphNode |
PQdel(GraphNode gn)
Deletes specified GraphNode from the PQ. |
GraphNode |
PQdelmin()
Deletes the minimum GraphNode from the PQ. |
boolean |
PQempty()
Method that tells whether this PQ is empty |
void |
PQinc(int key,
double cost)
Increments the cost of a GraphNode in this PQ. |
void |
PQinsert(GraphNode gn)
Inserts a GraphNode into this PQ |
| Methods inherited from class java.lang.Object |
|
| Constructor Detail |
public PQ(int maxN)
maxN amount of GraphNodes.maxN - the maximum amount of GraphNodes for the PQ| Method Detail |
public boolean PQempty()
public void PQinsert(GraphNode gn)
k - GraphNode to be insertedPQdel(GraphNode),
PQdelmin()public GraphNode PQdelmin()
PQdel(GraphNode),
PQinsert(GraphNode)public GraphNode PQdel(GraphNode gn)
gn - the GraphNode to be deletedPQdelmin(),
PQinsert(GraphNode)
public void PQdec(int key,
double cost)
key - the key of the GraphNode to be decrementedcost - the new cost for the GraphNode
public void PQinc(int key,
double cost)
key - the key of the GraphNode to be incrementedcost - the new cost for the GraphNode
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||