org.eclipse.draw2d.internal.graph
Class BreakCycles
java.lang.Object
org.eclipse.draw2d.internal.graph.GraphVisitor
org.eclipse.draw2d.internal.graph.BreakCycles
- public class BreakCycles
- extends GraphVisitor
This visitor eliminates cycles in the graph using a "greedy" heuristic. Nodes which
are sources and sinks are marked and placed in a source and sink list, leaving only
nodes involved in cycles. A remaining node with the highest (outgoing-incoming) edges
score is then chosen greedily as if it were a source. The process is repeated until all
nodes have been marked and placed in a list. The lists are then concatenated, and any
edges which go backwards in this list will be inverted during the layout procedure.
- Since:
- 2.1.2
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BreakCycles
public BreakCycles()
visit
public void visit(DirectedGraph g)
- Description copied from class:
GraphVisitor
- Act on the given directed graph.
- Specified by:
visit
in class GraphVisitor
- Parameters:
g
- the graph- See Also:
GraphVisitor.visit(org.eclipse.draw2d.graph.DirectedGraph)
Copyright (c) IBM Corp. and others 2000, 2005. All Rights Reserved.