org.eclipse.draw2d.graph
Class CompoundDirectedGraphLayout
java.lang.Object
org.eclipse.draw2d.internal.graph.GraphVisitor
org.eclipse.draw2d.graph.CompoundDirectedGraphLayout
- public final class CompoundDirectedGraphLayout
- extends GraphVisitor
Performs a graph layout on a CompoundDirectedGraph
. The input format is
the same as for DirectedGraphLayout
. All nodes, including subgraphs and their
children, should be added to the DirectedGraph.nodes
field.
The requirements for this algorithm are the same as those of
DirectedGraphLayout
, with the following exceptions:
- There is an implied edge between a subgraph and each of its member nodes. These
edges form the containment graph T. Thus, the compound directed graph
CG is said to be connected iff Union(G, T) is connected,
where G represents the given nodes (including subgraphs) and edges.
- Using the same definitions as above, this layout will remove any cycles found in
the input graph G. However, it will not detect or remove compound cycles.
If the input graph contains compound cycles, the results are undefined, and may
include infinite loops. A compound cycle is defined as: a cycle comprised of edges
from G, T, and T-1, in the form
(c*e+p*e+)*, where
T-1 is the backwards graph of T, c element of T, e
element of G, and p element of T-1.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CompoundDirectedGraphLayout
public CompoundDirectedGraphLayout()
visit
public void visit(DirectedGraph g)
- Specified by:
visit
in class GraphVisitor
- See Also:
GraphVisitor.visit(org.eclipse.draw2d.graph.DirectedGraph)