Package | com.yworks.yfiles.algo |
Class | public class NodeOrders |
Inheritance | NodeOrders YObject Object |
Method | Defined By | ||
---|---|---|---|
NodeOrders(init:Boolean = true) | NodeOrders | ||
[static]
Like dfsCompletion2() but the result is returned as a NodeList. | NodeOrders | ||
dfsCompletion2(graph:Graph, order:Vector.<int>):void [static]
This method calculates a node order that is identical with the order of node completion events in a depth first search. | NodeOrders | ||
equals(o:Object):Boolean | YObject | ||
getClass():Class [override] | NodeOrders | ||
hashCode():int | YObject | ||
[static] | NodeOrders | ||
[static]
Like st2() but the result is returned as a NodeList. | NodeOrders | ||
[static]
Assigns an ST-order to the nodes of a biconnected graph. | NodeOrders | ||
[static]
Similar to st2(). | NodeOrders | ||
[static]
Converts an array-based result yield by a method of this class to a NodeList that contains all nodes of the order in the correct sequence. | NodeOrders | ||
[static]
Copies a list-based result yield by a method of this class to a NodeMap. | NodeOrders | ||
[static]
Copies an array-based result yield by a method of this class to a NodeMap that will provide values of basic type int. | NodeOrders | ||
[static]
Returns a topological node order of an acyclic graph. | NodeOrders | ||
topological2(graph:Graph, order:Vector.<int>):Boolean [static]
Assigns a topological order to the nodes of an acyclic graph. | NodeOrders |
Method | Defined By | ||
---|---|---|---|
initNodeOrders():void | NodeOrders |
NodeOrders | () | Constructor |
public function NodeOrders(init:Boolean = true)
init:Boolean (default = true )
|
dfsCompletion | () | method |
public static function dfsCompletion(graph:Graph):NodeList
Like dfsCompletion2() but the result is returned as a NodeList.
Parameters
graph:Graph |
NodeList |
See also
dfsCompletion2 | () | method |
public static function dfsCompletion2(graph:Graph, order:Vector.<int>):void
This method calculates a node order that is identical with the order of node completion events in a depth first search. This order is a reversed topological order in case the input graph is acyclic.
Complexity O(graph.N()+graph.E())
Parameters
graph:Graph | |
order:Vector.<int> |
See also
getClass | () | method |
override public function getClass():Class
ReturnsClass |
initNodeOrders | () | method |
protected final function initNodeOrders():void
newNodeOrders | () | method |
st | () | method |
public static function st(graph:Graph):NodeList
Like st2() but the result is returned as a NodeList.
Parameters
graph:Graph |
NodeList |
See also
st2 | () | method |
public static function st2(graph:Graph, stOrder:Vector.<int>):void
Assigns an ST-order to the nodes of a biconnected graph.
An ST order (v_1,v_2,....,v_n)
for a biconnected graph is a node order which guarantees that
S
and the last node T
are connected by an edge.v_i
in the order that are not S
or T
there are neighbors v_j
and v_k
with j < i
and k > i
.Precondition tOrder.length == graph.N()
Precondition GraphChecker.isBiconnected(graph)
Complexity O(graph.N()+graph.E())
Parameters
graph:Graph — the graph being acted upon
| |
stOrder:Vector.<int> — result value that holds for each node v the zero-based index within the calculated order, i.e stOrder[v.index()] == 5 means that v is the 6-th node within the order.
|
st3 | () | method |
public static function st3(graph:Graph, stOrder:Vector.<int>, stEdge:Edge):void
Similar to st2().
Additionally, the edge between the first node S
and the last node T
of the returned ordering can be specified.
Parameters
graph:Graph | |
stOrder:Vector.<int> | |
stEdge:Edge — an edge that connects the first node of the ordering with the last node of the ordering.
|
See also
toNodeList | () | method |
public static function toNodeList(graph:Graph, order:Vector.<int>):NodeList
Converts an array-based result yield by a method of this class to a NodeList that contains all nodes of the order in the correct sequence.
Parameters
graph:Graph | |
order:Vector.<int> |
NodeList |
toNodeMap | () | method |
public static function toNodeMap(order:NodeList, result:NodeMap):void
Copies a list-based result yield by a method of this class to a NodeMap.
The resulting NodeMap will provide for each node the index of the node within the given order. The index is of basic type int
.
Parameters
order:NodeList | |
result:NodeMap |
toNodeMap2 | () | method |
public static function toNodeMap2(graph:Graph, order:Vector.<int>, result:NodeMap):void
Copies an array-based result yield by a method of this class to a NodeMap that will provide values of basic type int
.
Parameters
graph:Graph | |
order:Vector.<int> | |
result:NodeMap |
topological | () | method |
public static function topological(graph:Graph):NodeList
Returns a topological node order of an acyclic graph.
Precondition GraphChecker.isAcyclic(graph)
Complexity O(graph.N()+graph.E())
Parameters
graph:Graph |
NodeList |
topological2 | () | method |
public static function topological2(graph:Graph, order:Vector.<int>):Boolean
Assigns a topological order to the nodes of an acyclic graph.
If the given graph is not acyclic then this method returnsfalse
leaving the contents of result topOrder
unspecified. A topological node order of an acyclic graph has the property that for each node v
all of its successors have a higher rank in the order than v
itself.
Precondition order.length == graph.N()
Complexity O(graph.N()+graph.E())
Parameters
graph:Graph — the graph being acted upon
| |
order:Vector.<int> — result value that holds for each node v the zero-based index within the calculated order, i.e topOrder[v.index()] == 5 means that v is the 6-th node within the order.
|
Boolean |