JGraph
v5.13.0.0


com.jgraph.layout.hierarchical
Class JGraphGreedyCycleRemover

java.lang.Object
  extended by com.jgraph.layout.hierarchical.JGraphGreedyCycleRemover
All Implemented Interfaces:
JGraphHierarchicalLayoutStep

public class JGraphGreedyCycleRemover
extends Object
implements JGraphHierarchicalLayoutStep

A Greedy Cycle removal algorithm for pre-processing cyclic graphs prior to applying a hierarchical layout. The cycles are only reversed in the internal model of the hierarchy.


Field Summary
protected  Object[] roots
          The root cells of this hierarchy
protected  List sinks
          A list of the end point nodes in the layout
protected  List sources
          A list of the start point nodes in the layout
 
Constructor Summary
JGraphGreedyCycleRemover(Object[] roots)
          Constructor that has the roots specified
 
Method Summary
protected  Object[] getOrderedVertices(JGraphFacade facade)
          Performs the actual greedy cycle removal routine.
 JGraphHierarchyModel run(JGraphFacade facade, JGraphHierarchyModel model)
          Reverses cycles in the internal model using the graph information specified
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sources

protected List sources
A list of the start point nodes in the layout


sinks

protected List sinks
A list of the end point nodes in the layout


roots

protected Object[] roots
The root cells of this hierarchy

Constructor Detail

JGraphGreedyCycleRemover

public JGraphGreedyCycleRemover(Object[] roots)
Constructor that has the roots specified

Parameters:
roots - the roots of this hierarchy
Method Detail

run

public JGraphHierarchyModel run(JGraphFacade facade,
                                JGraphHierarchyModel model)
Reverses cycles in the internal model using the graph information specified

Specified by:
run in interface JGraphHierarchicalLayoutStep
Parameters:
facade - the facade describing the input graph
model - an internal model of the hierarchical layout
Returns:
the updated hierarchy model

getOrderedVertices

protected Object[] getOrderedVertices(JGraphFacade facade)
Performs the actual greedy cycle removal routine.

Parameters:
facade - the hierarchy facade to be acted upon
Returns:
the ordered vertices

JGraph
v5.13.0.0


Copyright (C) 2001-2009 JGraph Ltd. All rights reserved.