| Package | com.yworks.yfiles.util.pq |
| Interface | public interface NodePQ |
| Implementors | BHeapNodePQ |
| Property | Defined By | ||
|---|---|---|---|
| empty : Boolean [read-only]
Returns whether or not this queue is empty
| NodePQ | ||
| min : Node [read-only]
Returns he node with smallest priority in this queue. | NodePQ | ||
| Method | Defined By | ||
|---|---|---|---|
Adds the given node with the given priority to the queue. | NodePQ | ||
clear():void
Makes this queue the empty queue. | NodePQ | ||
Returns whether or not the given node is contained in this queue. | NodePQ | ||
decreasePriority(v:Node, priority:Object):void
Decreased the priority value of the given node. | NodePQ | ||
getPriority(v:Node):Object
Returns the current priority of the given node. | NodePQ | ||
Removes the node with smallest priority from this queue. | NodePQ | ||
size():int
Returns the number of nodes currently in this queue
| NodePQ | ||
| empty | property |
empty:Boolean [read-only] Returns whether or not this queue is empty
public function get empty():Boolean| min | property |
min:Node [read-only] Returns he node with smallest priority in this queue.
Precondition !isEmpty()
public function get min():Node| add | () | method |
public function add(v:Node, priority:Object):voidAdds the given node with the given priority to the queue.
Precondition !contains(v)
Parameters
v:Node | |
priority:Object |
| clear | () | method |
public function clear():voidMakes this queue the empty queue. in this queue.
| contains | () | method |
public function contains(v:Node):BooleanReturns whether or not the given node is contained in this queue.
Parameters
v:Node |
Boolean |
| decreasePriority | () | method |
public function decreasePriority(v:Node, priority:Object):voidDecreased the priority value of the given node.
Precondition contains(v)
Precondition c.compare(p,getPriority(v)) < 0, where c is the corresponding comparator for the priorities in this queue.
Parameters
v:Node | |
priority:Object |
| getPriority | () | method |
public function getPriority(v:Node):ObjectReturns the current priority of the given node.
Parameters
v:Node |
Object |
| removeMin | () | method |
public function removeMin():NodeRemoves the node with smallest priority from this queue.
Precondition !isEmpty()
ReturnsNode — the removed node with smallest priority
|
| size | () | method |
public function size():intReturns the number of nodes currently in this queue
Returnsint |