|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Defines an interface for specialized priority queues that contains nodes which are prioritized by associated double values.
Method Summary | |
void |
add(Node n,
double priority)
Adds a node with the given priority to the queue. |
void |
clear()
Removes all entries from the queue. |
boolean |
contains(Node n)
Returns whether or not the given node is contained within this queue. |
void |
decreasePriority(Node n,
double priority)
Decreases the priority of a node in the queue to a given value. |
void |
dispose()
Disposes this queue. |
Node |
getMin()
Returns he node with smallest priority in this queue. |
double |
getPriority(Node n)
Returns the current priority of the given node. |
boolean |
isEmpty()
Returns whether or not this queue is empty. |
Node |
removeMin()
Removes the node with the minimal priority from the queue. |
Method Detail |
public boolean isEmpty()
public boolean contains(Node n)
public void add(Node n, double priority)
public Node removeMin()
public Node getMin()
public void decreasePriority(Node n, double priority)
n
- a node in the priotity queue.priority
- the new priority of the node.public void clear()
public double getPriority(Node n)
public void dispose()
|
© Copyright 2000-2003, yWorks GmbH. All rights reserved. 2003 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |