Package | com.yworks.yfiles.util.pq |
Class | public class IntObjectPQ |
Inheritance | IntObjectPQ YObject Object |
Property | Defined By | ||
---|---|---|---|
empty : Boolean [read-only]
Returns whether or not this queue is empty
Complexity O(1)
| IntObjectPQ | ||
min : Object [read-only]
Returns he node with smallest priority in this queue. | IntObjectPQ | ||
minPriority : int [read-only]
Returns the minimum priority value in this queue. | IntObjectPQ |
Method | Defined By | ||
---|---|---|---|
Creates an empty ObjectPQ using the given com.yworks.yfiles.base.DataProvider and com.yworks.yfiles.base.DataAcceptor to store and retrieve Object support information. | IntObjectPQ | ||
add(o:Object, priority:int):void
Adds the given node with with given priority to this queue. | IntObjectPQ | ||
changePriority(o:Object, p:int):void
Changes the priority value of the given node. | IntObjectPQ | ||
clear():void
Makes this queue the empty queue. | IntObjectPQ | ||
contains(o:Object):Boolean
Returns whether or not the given node is contained in this queue. | IntObjectPQ | ||
decreasePriority(o:Object, priority:int):void
Decreases the priority value of the given node. | IntObjectPQ | ||
dispose():void
Does nothing. | IntObjectPQ | ||
equals(o:Object):Boolean | YObject | ||
getClass():Class [override] | IntObjectPQ | ||
getPriority(o:Object):int
Returns the current priority of the given node. | IntObjectPQ | ||
hashCode():int | YObject | ||
increasePriority(o:Object, priority:int):void
Increases the priority value of the given node. | IntObjectPQ | ||
[static]
Creates an empty ObjectPQ using the given com.yworks.yfiles.base.DataProvider and com.yworks.yfiles.base.DataAcceptor to store and retrieve Object support information. | IntObjectPQ | ||
remove(o:Object):void
Removes the given node from this queue. | IntObjectPQ | ||
removeMin():Object
Removes the node with smallest priority from this queue
Precondition !isEmpty()
Complexity O(log(size()))
| IntObjectPQ | ||
size():int
Returns the number of nodes currently in this queue
Complexity O(1)
| IntObjectPQ |
Method | Defined By | ||
---|---|---|---|
Initializes this object. | IntObjectPQ |
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:Object
[read-only] Returns he node with smallest priority in this queue.
Precondition !isEmpty()
public function get min():Object
minPriority | property |
minPriority:int
[read-only] Returns the minimum priority value in this queue.
public function get minPriority():int
IntObjectPQ | () | Constructor |
public function IntObjectPQ(initialSize:int, provider:DataProvider, acceptor:DataAcceptor, init:Boolean = true)
Creates an empty ObjectPQ using the given com.yworks.yfiles.base.DataProvider and com.yworks.yfiles.base.DataAcceptor to store and retrieve Object support information. The contents of the provider should be modified through the use of the acceptor, i.e. they should be based on the same initially empty backing store. Additionally this backing store should not be modified externally as long as this PQ is still in use.
ParametersinitialSize:int | |
provider:DataProvider | |
acceptor:DataAcceptor | |
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.
|
See also
add | () | method |
public function add(o:Object, priority:int):void
Adds the given node with with given priority to this queue.
Precondition !contains(v)
Complexity O(log(size()))
Parameters
o:Object | |
priority:int |
changePriority | () | method |
public function changePriority(o:Object, p:int):void
Changes the priority value of the given node.
Precondition contains(v)
Complexity O(log(size()))
Parameters
o:Object | |
p:int |
clear | () | method |
public function clear():void
Makes this queue the empty queue. in this queue.
Complexity O(graph.N())
contains | () | method |
public function contains(o:Object):Boolean
Returns whether or not the given node is contained in this queue.
Complexity O(1)
Parameters
o:Object |
Boolean |
decreasePriority | () | method |
public function decreasePriority(o:Object, priority:int):void
Decreases the priority value of the given node.
Precondition contains(v)
Precondition priority < getPriority(v)
Complexity O(log(size()))
Parameters
o:Object | |
priority:int |
dispose | () | method |
public function dispose():void
Does nothing.
getClass | () | method |
override public function getClass():Class
ReturnsClass |
getPriority | () | method |
public function getPriority(o:Object):int
Returns the current priority of the given node.
Precondition contains(v)
Parameters
o:Object |
int |
increasePriority | () | method |
public function increasePriority(o:Object, priority:int):void
Increases the priority value of the given node.
Precondition contains(v)
Precondition priority > getPriority(v)
Complexity O(log(size()))
Parameters
o:Object | |
priority:int |
initIntObjectPQ | () | method |
protected final function initIntObjectPQ(initialSize:int, provider:DataProvider, acceptor:DataAcceptor):void
Initializes this object. See the documentation of the corresponding factory method newIntObjectPQ()
for details.
Parameters
initialSize:int | |
provider:DataProvider | |
acceptor:DataAcceptor |
See also
newIntObjectPQ | () | method |
public static function newIntObjectPQ(initialSize:int, provider:DataProvider, acceptor:DataAcceptor):IntObjectPQ
Creates an empty ObjectPQ using the given com.yworks.yfiles.base.DataProvider and com.yworks.yfiles.base.DataAcceptor to store and retrieve Object support information. The contents of the provider should be modified through the use of the acceptor, i.e. they should be based on the same initially empty backing store. Additionally this backing store should not be modified externally as long as this PQ is still in use.
Parameters
initialSize:int | |
provider:DataProvider | |
acceptor:DataAcceptor |
IntObjectPQ |
See also
remove | () | method |
public function remove(o:Object):void
Removes the given node from this queue.
Precondition contains(v)
Complexity O(log(size()))
Parameters
o:Object |
removeMin | () | method |
public function removeMin():Object
Removes the node with smallest priority from this queue
Precondition !isEmpty()
Complexity O(log(size()))
ReturnsObject — 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 |