mxHierarchicalLayoutStage
public class mxMedianHybridCrossingReduction extends java.lang.Object implements mxHierarchicalLayoutStage
Modifier and Type | Class | Description |
---|---|---|
protected class |
mxMedianHybridCrossingReduction.MedianCellSorter |
A utility class used to track cells whilst sorting occurs on the median
values.
|
Modifier and Type | Field | Description |
---|---|---|
protected int |
currentBestCrossings |
The total number of crossings found in the best configuration so far
|
protected int |
iterationsWithoutImprovement |
|
protected mxHierarchicalLayout |
layout |
Reference to the enclosing layout algorithm
|
protected int |
maxIterations |
The maximum number of iterations to perform whilst reducing edge
crossings
|
protected int |
maxNoImprovementIterations |
|
protected mxGraphAbstractHierarchyCell[][] |
nestedBestRanks |
Stores each rank as a collection of cells in the best order found for
each layer so far
|
Constructor | Description |
---|---|
mxMedianHybridCrossingReduction(mxHierarchicalLayout layout) |
Constructor that has the roots specified
|
Modifier and Type | Method | Description |
---|---|---|
protected int |
calculateRankCrossing(int i,
mxGraphHierarchyModel model) |
Calculates the number of edges crossings between the specified rank and
the rank below it
|
void |
execute(java.lang.Object parent) |
Performs a vertex ordering within ranks as described by Gansner et al
1993
|
protected mxHierarchicalLayout layout
protected int maxIterations
protected mxGraphAbstractHierarchyCell[][] nestedBestRanks
protected int currentBestCrossings
protected int iterationsWithoutImprovement
protected int maxNoImprovementIterations
public mxMedianHybridCrossingReduction(mxHierarchicalLayout layout)
public void execute(java.lang.Object parent)
execute
in interface mxHierarchicalLayoutStage
protected int calculateRankCrossing(int i, mxGraphHierarchyModel model)
i
- the topmost rank of the pair ( higher rank value )model
- the internal hierarchy model of the graphCopyright (c) 2010-2017 Gaudenz Alder, JGraph Ltd. All rights reserved.