Eclipse Draw2d
3.1

org.eclipse.draw2d.internal.graph
Class BreakCycles

java.lang.Object
  extended byorg.eclipse.draw2d.internal.graph.GraphVisitor
      extended byorg.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

Constructor Summary
BreakCycles()
           
 
Method Summary
 void visit(DirectedGraph g)
          Act on the given directed graph.
 
Methods inherited from class org.eclipse.draw2d.internal.graph.GraphVisitor
revisit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BreakCycles

public BreakCycles()
Method Detail

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)

Eclipse Draw2d
3.1

Copyright (c) IBM Corp. and others 2000, 2005. All Rights Reserved.