Package | com.yworks.yfiles.util.pq |
Class | public class DoubleObjectPQ |
Inheritance | DoubleObjectPQ YObject Object |
Property | Defined By | ||
---|---|---|---|
empty : Boolean [read-only]
Returns whether or not this queue is empty. | DoubleObjectPQ | ||
min : Object [read-only]
Returns the object with smallest priority in this queue. | DoubleObjectPQ | ||
minPriority : Number [read-only]
Returns the minimum priority value in this queue. | DoubleObjectPQ |
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. | DoubleObjectPQ | ||
add(o:Object, priority:Number):void
Adds the given object with given priority to this queue. | DoubleObjectPQ | ||
changePriority(o:Object, priority:Number):void
Changes the priority value of the given object. | DoubleObjectPQ | ||
clear():void
Makes this queue the empty queue. | DoubleObjectPQ | ||
contains(o:Object):Boolean
Returns whether or not the given object is contained. | DoubleObjectPQ | ||
decreasePriority(o:Object, priority:Number):void
Decreases the priority value of the given object. | DoubleObjectPQ | ||
dispose():void
Does nothing. | DoubleObjectPQ | ||
equals(o:Object):Boolean | YObject | ||
getClass():Class [override] | DoubleObjectPQ | ||
getPriority(o:Object):Number
Returns the current priority of the given object. | DoubleObjectPQ | ||
hashCode():int | YObject | ||
increasePriority(o:Object, priority:Number):void
Increases the priority value of the given object. | DoubleObjectPQ | ||
[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. | DoubleObjectPQ | ||
remove(o:Object):void
Removes the given object from this queue. | DoubleObjectPQ | ||
removeMin():Object
Removes the object with smallest priority from this queue. | DoubleObjectPQ | ||
size():int
Returns the number of nodes currently in this queue. | DoubleObjectPQ |
Method | Defined By | ||
---|---|---|---|
Initializes this object. | DoubleObjectPQ |
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 the object with smallest priority in this queue.
Precondition !isEmpty()
public function get min():Object
minPriority | property |
minPriority:Number
[read-only] Returns the minimum priority value in this queue.
public function get minPriority():Number
DoubleObjectPQ | () | Constructor |
public function DoubleObjectPQ(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:Number):void
Adds the given object with given priority to this queue.
Precondition !contains(o)
Complexity O(log(size()))
Parameters
o:Object | |
priority:Number |
changePriority | () | method |
public function changePriority(o:Object, priority:Number):void
Changes the priority value of the given object.
Precondition contains(o)
Complexity O(log(size()))
Parameters
o:Object | |
priority:Number |
clear | () | method |
public function clear():void
Makes this queue the empty queue.
Complexity O(size())
contains | () | method |
public function contains(o:Object):Boolean
Returns whether or not the given object is contained. in this queue.
Complexity O(1)
Parameters
o:Object |
Boolean |
decreasePriority | () | method |
public function decreasePriority(o:Object, priority:Number):void
Decreases the priority value of the given object.
Precondition contains(o)
Precondition priority < getPriority(o)
Complexity O(log(size()))
Parameters
o:Object | |
priority:Number |
dispose | () | method |
public function dispose():void
Does nothing.
getClass | () | method |
override public function getClass():Class
ReturnsClass |
getPriority | () | method |
public function getPriority(o:Object):Number
Returns the current priority of the given object.
Precondition contains(o)
Parameters
o:Object |
Number |
increasePriority | () | method |
public function increasePriority(o:Object, priority:Number):void
Increases the priority value of the given object.
Precondition contains(o)
Precondition priority > getPriority(o)
Complexity O(log(size()))
Parameters
o:Object | |
priority:Number |
initDoubleObjectPQ | () | method |
protected final function initDoubleObjectPQ(initialSize:int, provider:DataProvider, acceptor:DataAcceptor):void
Initializes this object. See the documentation of the corresponding factory method newDoubleObjectPQ()
for details.
Parameters
initialSize:int | |
provider:DataProvider | |
acceptor:DataAcceptor |
See also
newDoubleObjectPQ | () | method |
public static function newDoubleObjectPQ(initialSize:int, provider:DataProvider, acceptor:DataAcceptor):DoubleObjectPQ
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 |
DoubleObjectPQ |
See also
remove | () | method |
public function remove(o:Object):void
Removes the given object from this queue.
Precondition contains(o)
Complexity O(log(size()))
Parameters
o:Object |
removeMin | () | method |
public function removeMin():Object
Removes the object with smallest priority from this queue.
Precondition !isEmpty()
Complexity O(log(size()))
ReturnsObject — the removed object with smallest priority
|
size | () | method |
public function size():int
Returns the number of nodes currently in this queue.
Complexity O(1)
Returnsint |