Class SugiyamaRunnable<V,E>
- java.lang.Object
-
- org.jungrapht.visualization.layout.algorithms.sugiyama.SugiyamaRunnable<V,E>
-
- Type Parameters:
V- vertex typeE- edge type
- All Implemented Interfaces:
Runnable,LayeredRunnable<E>
- Direct Known Subclasses:
TestSugiyamaRunnable
public class SugiyamaRunnable<V,E> extends Object implements LayeredRunnable<E>
Runnablepart of theSugiyamaLayoutAlgorithmThe Sugiyama Hierarchical Minimum-Cross layout algorithm- See Also:
- "Methods for Visual Understanding Hierarchical System Structures. KOZO SUGIYAMA, MEMBER, IEEE, SHOJIRO TAGAWA, AND MITSUHIKO TODA, MEMBER, IEEE", "An E log E Line Crossing Algorithm for Levelled Graphs. Vance Waddle and Ashok Malhotra IBM Thomas J. Watson Research Center", "Simple and Efficient Bilayer Cross Counting. Wilhelm Barth, Petra Mutzel, Institut für Computergraphik und Algorithmen Technische Universität Wien, Michael Jünger, Institut für Informatik Universität zu Köln", "Fast and Simple Horizontal Coordinate Assignment, Ulrik Brandes and Boris Köpf, Department of Computer & Information Science, University of Konstanz"
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSugiyamaRunnable.Builder<V,E,T extends SugiyamaRunnable<V,E>,B extends SugiyamaRunnable.Builder<V,E,T,B>>a Builder to create a configured instance
-
Field Summary
Fields Modifier and Type Field Description protected booleancancelledprotected Comparator<E>edgeComparatorprotected Map<E,List<Point>>edgePointMapprotected Predicate<E>edgePredicateprotected org.jgrapht.Graph<V,E>graphprotected Layeringlayeringprotected LayoutModel<V>layoutModelprotected intmaxLevelCrossprotected booleanmultiComponentprotected org.jgrapht.alg.util.NeighborCache<LV<V>,LE<V,E>>neighborCacheprotected booleanpostStraightenprotected booleanstraightenEdgesprotected org.jgrapht.Graph<LV<V>,LE<V,E>>svGraphprotected booleantransposeprotected inttransposeLimitprotected Comparator<V>vertexComparatorprotected Map<LV<V>,VertexMetadata<V>>vertexMetadataMapprotected Predicate<V>vertexPredicateprotected Function<V,Rectangle>vertexShapeFunction
-
Constructor Summary
Constructors Modifier Constructor Description protectedSugiyamaRunnable(SugiyamaRunnable.Builder<V,E,?,?> builder)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <V,E>
SugiyamaRunnable.Builder<V,E,?,?>builder()voidcancel()protected LV<V>[][]copy(LV<V>[][] in)Map<E,List<Point>>getEdgePointMap()protected voidmedianDownwards(LV<V>[][] layers, org.jgrapht.Graph<LV<V>,LE<V,E>> svGraph)protected voidmedianUpwards(LV<V>[][] layers, org.jgrapht.Graph<LV<V>,LE<V,E>> svGraph)protected LV<V>[][]restore(LV<V>[][] layers, Map<LV<V>,VertexMetadata<V>> vertexMetadataMap)voidrun()protected Map<LV<V>,VertexMetadata<V>>save(LV<V>[][] in)protected voidtransposeDownwards(LV<V>[][] ranks, Map<Integer,List<LE<V,E>>> reducedEdgeMap)protected voidtransposeUpwards(LV<V>[][] ranks, Map<Integer,List<LE<V,E>>> reducedEdgeMap)
-
-
-
Field Detail
-
layoutModel
protected final LayoutModel<V> layoutModel
-
vertexComparator
protected Comparator<V> vertexComparator
-
edgeComparator
protected Comparator<E> edgeComparator
-
straightenEdges
protected boolean straightenEdges
-
postStraighten
protected boolean postStraighten
-
transpose
protected boolean transpose
-
transposeLimit
protected int transposeLimit
-
maxLevelCross
protected int maxLevelCross
-
layering
protected Layering layering
-
vertexMetadataMap
protected Map<LV<V>,VertexMetadata<V>> vertexMetadataMap
-
multiComponent
protected boolean multiComponent
-
cancelled
protected boolean cancelled
-
-
Constructor Detail
-
SugiyamaRunnable
protected SugiyamaRunnable(SugiyamaRunnable.Builder<V,E,?,?> builder)
-
-
Method Detail
-
builder
public static <V,E> SugiyamaRunnable.Builder<V,E,?,?> builder()
- Type Parameters:
V- vertex typeE- edge type- Returns:
- a Builder ready to configure
-
cancel
public void cancel()
- Specified by:
cancelin interfaceLayeredRunnable<V>
-
transposeDownwards
protected void transposeDownwards(LV<V>[][] ranks, Map<Integer,List<LE<V,E>>> reducedEdgeMap)
-
transposeUpwards
protected void transposeUpwards(LV<V>[][] ranks, Map<Integer,List<LE<V,E>>> reducedEdgeMap)
-
getEdgePointMap
public Map<E,List<Point>> getEdgePointMap()
- Specified by:
getEdgePointMapin interfaceLayeredRunnable<V>
-
medianDownwards
protected void medianDownwards(LV<V>[][] layers, org.jgrapht.Graph<LV<V>,LE<V,E>> svGraph)
-
medianUpwards
protected void medianUpwards(LV<V>[][] layers, org.jgrapht.Graph<LV<V>,LE<V,E>> svGraph)
-
-