Class JGraphGreedyCycleRemover
java.lang.Object
com.jgraph.layout.hierarchical.JGraphGreedyCycleRemover
- All Implemented Interfaces:
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
Fields -
Constructor Summary
ConstructorsConstructorDescriptionJGraphGreedyCycleRemover(Object[] roots) Constructor that has the roots specified -
Method Summary
Modifier and TypeMethodDescriptionprotected Object[]getOrderedVertices(JGraphFacade facade) Performs the actual greedy cycle removal routine.run(JGraphFacade facade, JGraphHierarchyModel model) Reverses cycles in the internal model using the graph information specified
-
Field Details
-
sources
A list of the start point nodes in the layout -
sinks
A list of the end point nodes in the layout -
roots
The root cells of this hierarchy
-
-
Constructor Details
-
JGraphGreedyCycleRemover
Constructor that has the roots specified- Parameters:
roots- the roots of this hierarchy
-
-
Method Details
-
run
Reverses cycles in the internal model using the graph information specified- Specified by:
runin interfaceJGraphHierarchicalLayoutStep- Parameters:
facade- the facade describing the input graphmodel- an internal model of the hierarchical layout- Returns:
- the updated hierarchy model
-
getOrderedVertices
Performs the actual greedy cycle removal routine.- Parameters:
facade- the hierarchy facade to be acted upon- Returns:
- the ordered vertices
-