Package | com.yworks.yfiles.util.pq |
Class | public class BHeapDoubleNodePQ |
Inheritance | BHeapDoubleNodePQ YObject Object |
Implements | DoubleNodePQ |
Property | Defined By | ||
---|---|---|---|
empty : Boolean [read-only]
Returns whether or not this queue is empty
Complexity O(1)
| BHeapDoubleNodePQ | ||
min : Node [read-only]
Returns he node with smallest priority in this queue. | BHeapDoubleNodePQ | ||
minPriority : Number [read-only]
Returns the minimum priority value in this queue. | BHeapDoubleNodePQ |
Method | Defined By | ||
---|---|---|---|
BHeapDoubleNodePQ(graph:Graph, init:Boolean = true)
Creates an empty NodePQ for nodes contained in the given graph. | BHeapDoubleNodePQ | ||
Adds the given node with with given priority to this queue. | BHeapDoubleNodePQ | ||
changePriority(v:Node, p:Number):void
Changes the priority value of the given node. | BHeapDoubleNodePQ | ||
clear():void
Makes this queue the empty queue. | BHeapDoubleNodePQ | ||
Returns whether or not the given node is contained in this queue. | BHeapDoubleNodePQ | ||
decreasePriority(v:Node, priority:Number):void
Decreases the priority value of the given node. | BHeapDoubleNodePQ | ||
dispose():void
Does nothing. | BHeapDoubleNodePQ | ||
equals(o:Object):Boolean | YObject | ||
getClass():Class [override] | BHeapDoubleNodePQ | ||
getPriority(v:Node):Number
Returns the current priority of the given node. | BHeapDoubleNodePQ | ||
hashCode():int | YObject | ||
increasePriority(v:Node, priority:Number):void | BHeapDoubleNodePQ | ||
[static]
Creates an empty NodePQ for nodes contained in the given graph. | BHeapDoubleNodePQ | ||
Removes the given node from this queue. | BHeapDoubleNodePQ | ||
Removes the node with smallest priority from this queue
Precondition !isEmpty()
Complexity O(log(size()))
| BHeapDoubleNodePQ | ||
size():int
Returns the number of nodes currently in this queue
Complexity O(1)
| BHeapDoubleNodePQ |
Method | Defined By | ||
---|---|---|---|
initBHeapDoubleNodePQ(graph:Graph):void
Initializes this object. | BHeapDoubleNodePQ |
empty | property |
empty:Boolean
[read-only] Returns whether or not this queue is empty
Complexity O(1)
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
minPriority | property |
minPriority:Number
[read-only] Returns the minimum priority value in this queue.
public function get minPriority():Number
BHeapDoubleNodePQ | () | Constructor |
public function BHeapDoubleNodePQ(graph:Graph, init:Boolean = true)
Creates an empty NodePQ for nodes contained in the given graph. Neither the node set nor the indices of the nodes of the given graph may change while this queue is being used.
Parametersgraph:Graph | |
init:Boolean (default = true ) — An internally used switch to help handle proper instance initialization in inheritance chains where classes can have multiple constructor-like factory methods.
This parameter can safely be ignored/omitted when calling the constructor.
|
add | () | method |
public function add(v:Node, value:Number):void
Adds the given node with with given priority to this queue.
Precondition !contains(v)
Complexity O(log(size()))
Parameters
v:Node | |
value:Number |
changePriority | () | method |
public function changePriority(v:Node, p:Number):void
Changes the priority value of the given node.
Precondition contains(v)
Complexity O(log(size()))
Parameters
v:Node | |
p:Number |
clear | () | method |
public function clear():void
Makes this queue the empty queue. in this queue.
Complexity O(graph.N())
contains | () | method |
public function contains(v:Node):Boolean
Returns whether or not the given node is contained in this queue.
Complexity O(1)
Parameters
v:Node |
Boolean |
decreasePriority | () | method |
public function decreasePriority(v:Node, priority:Number):void
Decreases 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.
Complexity O(log(size()))
Parameters
v:Node | |
priority:Number |
dispose | () | method |
public function dispose():void
Does nothing.
getClass | () | method |
override public function getClass():Class
ReturnsClass |
getPriority | () | method |
public function getPriority(v:Node):Number
Returns the current priority of the given node.
Precondition contains(v)
Parameters
v:Node |
Number |
increasePriority | () | method |
initBHeapDoubleNodePQ | () | method |
protected final function initBHeapDoubleNodePQ(graph:Graph):void
Initializes this object. See the documentation of the corresponding factory method newBHeapDoubleNodePQ()
for details.
Parameters
graph:Graph |
See also
newBHeapDoubleNodePQ | () | method |
public static function newBHeapDoubleNodePQ(graph:Graph):BHeapDoubleNodePQ
Creates an empty NodePQ for nodes contained in the given graph. Neither the node set nor the indices of the nodes of the given graph may change while this queue is being used.
Parameters
graph:Graph |
BHeapDoubleNodePQ |
remove | () | method |
public function remove(v:Node):void
Removes the given node from this queue.
Precondition contains(v)
Complexity O(log(size()))
Parameters
v:Node |
removeMin | () | method |
public function removeMin():Node
Removes the node with smallest priority from this queue
Precondition !isEmpty()
Complexity O(log(size()))
ReturnsNode — the removed node with smallest priority
|
size | () | method |
public function size():int
Returns the number of nodes currently in this queue
Complexity O(1)
Returnsint |