| Package | com.yworks.yfiles.util.pq |
| Class | public class ArrayIntNodePQ |
| Inheritance | ArrayIntNodePQ YObject Object |
| Implements | IntNodePQ |
| Property | Defined By | ||
|---|---|---|---|
| empty : Boolean [read-only]
Returns whether or not this queue is empty. | ArrayIntNodePQ | ||
| min : Node [read-only]
Returns the node with the minimal value in the queue.
Complexity O(1)
| ArrayIntNodePQ | ||
| Method | Defined By | ||
|---|---|---|---|
ArrayIntNodePQ(_graph:Graph, maxSize:int, init:Boolean = true)
Returns an empty Priority-Queue. | ArrayIntNodePQ | ||
Inserts a node into the queue. | ArrayIntNodePQ | ||
changePriority(n:Node, value:int):void
Changes the value of a node in the queue to a certain value. | ArrayIntNodePQ | ||
clear():void
Removes all entries from the queue. | ArrayIntNodePQ | ||
Returns whether or not the given node is contained within this queue. | ArrayIntNodePQ | ||
decreasePriority(n:Node, value:int):void
Decreases the value of a node in the queue to a certain value.
Complexity O(1)
| ArrayIntNodePQ | ||
dispose():void | ArrayIntNodePQ | ||
![]() | equals(o:Object):Boolean | YObject | |
getClass():Class [override] | ArrayIntNodePQ | ||
getPriority(v:Node):int | ArrayIntNodePQ | ||
![]() | hashCode():int | YObject | |
increasePriority(n:Node, value:int):void
Increases the value of a node in the queue to a certain value.
Complexity O(1).
| ArrayIntNodePQ | ||
[static]
Returns an empty Priority-Queue. | ArrayIntNodePQ | ||
[static]
Returns a new Priority-Queue initialized with all nodes of the graph. | ArrayIntNodePQ | ||
[static]
Returns an empty Priority-Queue. | ArrayIntNodePQ | ||
Removes a node from the priority queue. Time complexity in worst-case O(maxSize). | ArrayIntNodePQ | ||
Removes the node with the minimal value from the queue. Time complexity like remove(). | ArrayIntNodePQ | ||
| Method | Defined By | ||
|---|---|---|---|
Returns the list for a given slot. | ArrayIntNodePQ | ||
initArrayIntNodePQ1(_graph:Graph, maxSize:int):void
Initializes this object. | ArrayIntNodePQ | ||
Initializes this object. | ArrayIntNodePQ | ||
Initializes this object. | ArrayIntNodePQ | ||
| 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 the node with the minimal value in the queue.
Complexity O(1)
public function get min():Node| ArrayIntNodePQ | () | Constructor |
public function ArrayIntNodePQ(_graph:Graph, maxSize:int, init:Boolean = true)Returns an empty Priority-Queue.
Parameters_graph:Graph — the graph which contains the nodes
| |
maxSize:int — the maximum value of a node in the priority queue
| |
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(n:Node, value:int):voidInserts a node into the queue.
Complexity O(1)
Parameters
n:Node | |
value:int |
| changePriority | () | method |
public function changePriority(n:Node, value:int):voidChanges the value of a node in the queue to a certain value.
Complexity O(1).
Parameters
n:Node — a node in the priority queue.
| |
value:int — the new priority value of the node.
|
| clear | () | method |
public function clear():voidRemoves all entries from the queue.
Complexity O(maxSize)
| contains | () | method |
public function contains(n:Node):BooleanReturns whether or not the given node is contained within this queue.
Complexity O(1)
Parameters
n:Node |
Boolean |
| decreasePriority | () | method |
public function decreasePriority(n:Node, value:int):voidDecreases the value of a node in the queue to a certain value.
Complexity O(1)
Parameters
n:Node — a node in the priority queue.
| |
value:int — the new priority value of the node.
|
| dispose | () | method |
public function dispose():void| getClass | () | method |
override public function getClass():ClassReturnsClass |
| getList | () | method |
protected function getList(value:int):YListReturns the list for a given slot. If there is no list yet, create one.
Parameters
value:int |
YList |
| getPriority | () | method |
| increasePriority | () | method |
public function increasePriority(n:Node, value:int):voidIncreases the value of a node in the queue to a certain value.
Complexity O(1).
Parameters
n:Node — a node in the priority queue.
| |
value:int — the new priority value of the node.
|
| initArrayIntNodePQ1 | () | method |
protected final function initArrayIntNodePQ1(_graph:Graph, maxSize:int):void
Initializes this object. See the documentation of the corresponding factory method newArrayIntNodePQ1() for details.
Parameters
_graph:Graph | |
maxSize:int |
See also
| initArrayIntNodePQ2 | () | method |
protected final function initArrayIntNodePQ2(_graph:Graph, _initValues:DataProvider):void
Initializes this object. See the documentation of the corresponding factory method newArrayIntNodePQ2() for details.
Parameters
_graph:Graph | |
_initValues:DataProvider |
See also
| initArrayIntNodePQ3 | () | method |
protected final function initArrayIntNodePQ3(_graph:Graph, _valueMap:NodeMap, maxSize:int):void
Initializes this object. See the documentation of the corresponding factory method newArrayIntNodePQ3() for details.
Parameters
_graph:Graph | |
_valueMap:NodeMap | |
maxSize:int |
See also
| newArrayIntNodePQ1 | () | method |
public static function newArrayIntNodePQ1(_graph:Graph, maxSize:int):ArrayIntNodePQReturns an empty Priority-Queue.
Parameters
_graph:Graph — the graph which contains the nodes
| |
maxSize:int — the maximum value of a node in the priority queue
|
ArrayIntNodePQ |
| newArrayIntNodePQ2 | () | method |
public static function newArrayIntNodePQ2(_graph:Graph, _initValues:DataProvider):ArrayIntNodePQReturns a new Priority-Queue initialized with all nodes of the graph.
Parameters
_graph:Graph — the graph which contains the nodes
| |
_initValues:DataProvider — the initial priority values of the nodes.
|
ArrayIntNodePQ |
| newArrayIntNodePQ3 | () | method |
public static function newArrayIntNodePQ3(_graph:Graph, _valueMap:NodeMap, maxSize:int):ArrayIntNodePQ
Returns an empty Priority-Queue.
This constructor takes a NodeMap as argument which is used to store the priority values.
Parameters
_graph:Graph — the graph which contains the nodes
| |
_valueMap:NodeMap — here the priority values are stored
| |
maxSize:int — the maximum value of a node in the priority queue
|
ArrayIntNodePQ |
| remove | () | method |
public function remove(n:Node):voidRemoves a node from the priority queue. Time complexity in worst-case O(maxSize).
Complexity Amortized time complexity is O(maxSize), given that the sequence of minimal keys is non-decreasing
Parameters
n:Node |
| removeMin | () | method |
public function removeMin():NodeRemoves the node with the minimal value from the queue. Time complexity like remove().
ReturnsNode |
See also