|
JGraph
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jgraph.layout.hierarchical.JGraphMedianHybridCrossingReduction
public class JGraphMedianHybridCrossingReduction
Performs a vertex ordering within ranks as described by Gansner et al 1993
Nested Class Summary | |
---|---|
protected class |
JGraphMedianHybridCrossingReduction.MedianCellSorter
A utility class used to track cells whilst sorting occurs on the median values. |
Field Summary | |
---|---|
protected int |
currentBestCrossings
The total number of crossings found in the best configuration so far |
protected int |
iterationsWithoutImprovement
|
protected int |
maxIterations
The maximum number of iterations to perform whilst reducing edge crossings |
protected int |
maxNoImprovementIterations
|
protected java.lang.Object[][] |
nestedBestRanks
Stores each rank as a collection of cells in the best order found for each layer so far |
protected JGraphLayoutProgress |
progress
The layout progress bar |
Constructor Summary | |
---|---|
JGraphMedianHybridCrossingReduction()
|
Method Summary | |
---|---|
protected int |
calculateRankCrossing(int i,
JGraphHierarchyModel model)
Calculates the number of edges crossings between the specified rank and the rank below it |
JGraphLayoutProgress |
getProgress()
Returns the progress object that represents the progress of the current layout run. |
JGraphHierarchyModel |
run(JGraphFacade facade,
JGraphHierarchyModel model)
Performs a vertex ordering within ranks as described by Gansner et al 1993 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int maxIterations
protected java.lang.Object[][] nestedBestRanks
protected int currentBestCrossings
protected int iterationsWithoutImprovement
protected int maxNoImprovementIterations
protected JGraphLayoutProgress progress
Constructor Detail |
---|
public JGraphMedianHybridCrossingReduction()
Method Detail |
---|
public JGraphHierarchyModel run(JGraphFacade facade, JGraphHierarchyModel model)
run
in interface JGraphHierarchicalLayoutStep
facade
- the facade describing the input graphmodel
- an internal model of the hierarchical layout
protected int calculateRankCrossing(int i, JGraphHierarchyModel model)
i
- the topmost rank of the pair ( higher rank value )model
- the internal hierarchy model of the graph
public JGraphLayoutProgress getProgress()
JGraphLayout.Stoppable
By convention, the layout must check the isStopped method in its
inner-most loops and return immediately if the method returns
true
.
getProgress
in interface JGraphLayout.Stoppable
|
JGraph
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |