|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--y.algo.NodeOrders
Provides graph algorithms that order the nodes of a graph by a specific criterion.
Constructor Summary | |
NodeOrders()
|
Method Summary | |
static NodeList |
dfsCompletion(Graph graph)
Like NodeOrders.dfsCompletion(Graph,int[]) but the result is returned
as a NodeList. |
static void |
dfsCompletion(Graph graph,
int[] order)
This method calculates a node order that is identical with the order of node completion events in a depth first search. |
static NodeList |
st(Graph graph)
Like NodeOrders.st(Graph, int[]) but the result is returned as
a NodeList. |
static void |
st(Graph graph,
int[] stOrder)
Assigns an ST-order to the nodes of a biconnected graph. |
static NodeList |
toNodeList(Graph graph,
int[] order)
Converts an array-based result yielded by a method of this class to a NodeList that contains all nodes of the order in the correct sequence. |
static NodeList |
topological(Graph graph)
Returns a topological node order of an acyclic graph. |
static boolean |
topological(Graph graph,
int[] order)
Assigns a topological order to the nodes of an acyclic graph. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public NodeOrders()
Method Detail |
public static boolean topological(Graph graph, int[] order)
If the given graph is not acyclic then this method returns false
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.
graph
- the graph being acted uponorder
- 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.public static NodeList topological(Graph graph)
public static void dfsCompletion(Graph graph, int[] order)
NodeOrders.topological(Graph,int[])
public static NodeList dfsCompletion(Graph graph)
NodeOrders.dfsCompletion(Graph,int[])
but the result is returned
as a NodeList.
public static void st(Graph graph, int[] stOrder)
(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
.
- Preconditions:
- tOrder.length == graph.N()
- GraphChecker.isBiconnected(graph)
- Complexity:
- O(graph.N()+graph.E())
- Parameters:
graph
- the graph being acted uponstOrder
- 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.
public static NodeList st(Graph graph)
NodeOrders.st(Graph, int[])
but the result is returned as
a NodeList.
public static NodeList toNodeList(Graph graph, int[] order)
|
© Copyright 2000-2003, yWorks GmbH. All rights reserved. 2003 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |