Eclipse Layout Kernel Documentation

ELK Layered


Identifier: org.eclipse.elk.layered
Meta Data Provider: properties.LayeredMetaDataProvider

Description

Layer-based algorithm provided by the Eclipse Layout Kernel. Arranges as many edges as possible into one direction by placing nodes into subsequent layers. This implementation supports different routing styles (straight, orthogonal, splines); if orthogonal routing is selected, arbitrary port constraints are respected, thus enabling the layout of block diagrams such as actor-oriented models or circuit schematics. Furthermore, full layout of compound graphs with cross-hierarchy edges is supported when the respective option is activated on the top level.

Category: Layered

The layer-based method was introduced by Sugiyama, Tagawa and Toda in 1981. It emphasizes the direction of edges by pointing as many edges as possible into the same direction. The nodes are arranged in layers, which are sometimes called “hierarchies”, and then reordered such that the number of edge crossings is minimized. Afterwards, concrete coordinates are computed for the nodes and edge bend points.

Supported Graph Features

Name Description
Self Loops Edges connecting a node with itself.
Inside Self Loops Self-loops routed through a node instead of around it.
Multi Edges Multiple edges with the same source and target node.
Edge Labels Labels that are associated with edges.
Ports Edges are connected to nodes over ports.
Compound Edges that connect nodes from different hierarchy levels and are incident to compound nodes.
Clusters Edges that connect nodes from different clusters, but not the cluster parent nodes.

Supported Options

Option Type Default Value Identifier
Activate Inside Self Loops boolean false org​.eclipse​.elk​.insideSelfLoops​.activate
Add Unnecessary Bendpoints boolean false org​.eclipse​.elk​.layered​.unnecessaryBendpoints
Alignment Alignment Alignment.AUTOMATIC org​.eclipse​.elk​.alignment
Aspect Ratio double 1.6f org​.eclipse​.elk​.aspectRatio
BK Edge Straightening EdgeStraighteningStrategy EdgeStraighteningStrategy.IMPROVE_STRAIGHTNESS org​.eclipse​.elk​.layered​.nodePlacement​.bk​.edgeStraightening
BK Fixed Alignment FixedAlignment FixedAlignment.NONE org​.eclipse​.elk​.layered​.nodePlacement​.bk​.fixedAlignment
Comment Box boolean false org​.eclipse​.elk​.commentBox
Components Spacing double 12f org​.eclipse​.elk​.spacing​.componentComponent
Connected Components Compaction boolean false org​.eclipse​.elk​.layered​.compaction​.connectedComponents
Content Alignment EnumSet<ContentAlignment> EnumSet.noneOf(ContentAlignment) org​.eclipse​.elk​.layered​.contentAlignment
Crossing Minimization Strategy CrossingMinimizationStrategy CrossingMinimizationStrategy.LAYER_SWEEP org​.eclipse​.elk​.layered​.crossingMinimization​.strategy
Cycle Breaking Strategy CycleBreakingStrategy CycleBreakingStrategy.GREEDY org​.eclipse​.elk​.layered​.cycleBreaking​.strategy
Debug Mode boolean false org​.eclipse​.elk​.debugMode
Direction Direction Direction.UNDEFINED org​.eclipse​.elk​.direction
Direction Priority int 0 org​.eclipse​.elk​.layered​.priority​.direction
Distribute Nodes (Deprecated) boolean false org​.eclipse​.elk​.layered​.layering​.distributeNodes
Edge Edge Between Layer Spacing double 10 org​.eclipse​.elk​.layered​.spacing​.edgeEdgeBetweenLayers
Edge Label Placement EdgeLabelPlacement EdgeLabelPlacement.UNDEFINED org​.eclipse​.elk​.edgeLabels​.placement
Edge Label Placement Strategy EdgeLabelPlacementStrategy EdgeLabelPlacementStrategy.CENTER org​.eclipse​.elk​.layered​.edgeCenterLabelPlacementStrategy
Edge Label Side Selection EdgeLabelSideSelection EdgeLabelSideSelection.ALWAYS_DOWN org​.eclipse​.elk​.layered​.edgeLabelSideSelection
Edge Label Spacing double 5 org​.eclipse​.elk​.spacing​.edgeLabel
Edge Node Between Layers Spacing double 10 org​.eclipse​.elk​.layered​.spacing​.edgeNodeBetweenLayers
Edge Node Spacing double 10 org​.eclipse​.elk​.spacing​.edgeNode
Edge Routing EdgeRouting EdgeRouting.ORTHOGONAL org​.eclipse​.elk​.edgeRouting
Edge Spacing double 10 org​.eclipse​.elk​.spacing​.edgeEdge
Edge Thickness double 1 org​.eclipse​.elk​.edge​.thickness
Favor Straight Edges Over Balancing boolean <not defined> org​.eclipse​.elk​.layered​.nodePlacement​.favorStraightEdges
Feedback Edges boolean false org​.eclipse​.elk​.layered​.feedbackEdges
Greedy Switch Activation Threshold int 40 org​.eclipse​.elk​.layered​.crossingMinimization​.greedySwitch​.activationThreshold
Greedy Switch Crossing Minimization GreedySwitchType GreedySwitchType.TWO_SIDED org​.eclipse​.elk​.layered​.crossingMinimization​.greedySwitch​.type
Hierarchical Sweepiness double 0.1 org​.eclipse​.elk​.layered​.crossingMinimization​.hierarchicalSweepiness
Hierarchy Handling HierarchyHandling HierarchyHandling.INHERIT org​.eclipse​.elk​.hierarchyHandling
High Degree Node Maximum Tree Height int 5 org​.eclipse​.elk​.layered​.highDegreeNodes​.treeHeight
High Degree Node Threshold int 16 org​.eclipse​.elk​.layered​.highDegreeNodes​.threshold
High Degree Node Treatment boolean false org​.eclipse​.elk​.layered​.highDegreeNodes​.treatment
Hypernode boolean false org​.eclipse​.elk​.hypernode
Individual Spacing Override IndividualSpacings <not defined> org​.eclipse​.elk​.spacing​.individualOverride
Inside Self Loop boolean false org​.eclipse​.elk​.insideSelfLoops​.yo
Interactive Reference Point InteractiveReferencePoint InteractiveReferencePoint.CENTER org​.eclipse​.elk​.layered​.interactiveReferencePoint
Junction Points KVectorChain new KVectorChain() org​.eclipse​.elk​.junctionPoints
Label Node Spacing double 5 org​.eclipse​.elk​.spacing​.labelNode
Label Port Spacing double 5 org​.eclipse​.elk​.spacing​.labelPort
Label Spacing double 0 org​.eclipse​.elk​.spacing​.labelLabel
Layer Bound int Integer.MAX_VALUE org​.eclipse​.elk​.layered​.layering​.coffmanGraham​.layerBound
Layer Constraint LayerConstraint LayerConstraint.NONE org​.eclipse​.elk​.layered​.layering​.layerConstraint
Layout Hierarchy boolean false org​.eclipse​.elk​.layoutHierarchy
Layout Partition Integer <not defined> org​.eclipse​.elk​.partitioning​.partition
Layout Partitioning Boolean false org​.eclipse​.elk​.partitioning​.activate
Linear Segments Deflection Dampening double 0.3 org​.eclipse​.elk​.layered​.nodePlacement​.linearSegments​.deflectionDampening
Margins ElkMargin new ElkMargin() org​.eclipse​.elk​.margins
Max Node Promotion Iterations int 0 org​.eclipse​.elk​.layered​.layering​.nodePromotion​.maxIterations
Merge Edges boolean false org​.eclipse​.elk​.layered​.mergeEdges
Merge Hierarchy-Crossing Edges boolean true org​.eclipse​.elk​.layered​.mergeHierarchyEdges
Minimum Height double 0 org​.eclipse​.elk​.nodeSize​.minHeight
Minimum Width double 0 org​.eclipse​.elk​.nodeSize​.minWidth
No Layout boolean false org​.eclipse​.elk​.noLayout
Node Label Placement EnumSet<NodeLabelPlacement> NodeLabelPlacement.fixed() org​.eclipse​.elk​.nodeLabels​.placement
Node Layering Strategy LayeringStrategy LayeringStrategy.NETWORK_SIMPLEX org​.eclipse​.elk​.layered​.layering​.strategy
Node Node Between Layers Spacing double 20 org​.eclipse​.elk​.layered​.spacing​.nodeNodeBetweenLayers
Node Placement Strategy NodePlacementStrategy NodePlacementStrategy.BRANDES_KOEPF org​.eclipse​.elk​.layered​.nodePlacement​.strategy
Node Promotion Strategy NodePromotionStrategy NodePromotionStrategy.NONE org​.eclipse​.elk​.layered​.layering​.nodePromotion​.strategy
Node Size Constraints EnumSet<SizeConstraint> EnumSet.noneOf(SizeConstraint) org​.eclipse​.elk​.nodeSize​.constraints
Node Size Minimum KVector <not defined> org​.eclipse​.elk​.nodeSize​.minimum
Node Size Options EnumSet<SizeOptions> EnumSet.of(SizeOptions.DEFAULT_MINIMUM_SIZE, SizeOptions.APPLY_ADDITIONAL_PADDING) org​.eclipse​.elk​.nodeSize​.options
Node Spacing double 20 org​.eclipse​.elk​.spacing​.nodeNode
North or South Port boolean false org​.eclipse​.elk​.layered​.northOrSouthPort
Padding ElkPadding new ElkPadding(12) org​.eclipse​.elk​.padding
Port Alignment PortAlignment PortAlignment.JUSTIFIED org​.eclipse​.elk​.portAlignment​.basic
Port Alignment (East) PortAlignment PortAlignment.UNDEFINED org​.eclipse​.elk​.portAlignment​.east
Port Alignment (North) PortAlignment PortAlignment.UNDEFINED org​.eclipse​.elk​.portAlignment​.north
Port Alignment (South) PortAlignment PortAlignment.UNDEFINED org​.eclipse​.elk​.portAlignment​.south
Port Alignment (West) PortAlignment PortAlignment.UNDEFINED org​.eclipse​.elk​.portAlignment​.west
Port Anchor Offset KVector <not defined> org​.eclipse​.elk​.port​.anchor
Port Border Offset double 0 org​.eclipse​.elk​.port​.borderOffset
Port Constraints PortConstraints PortConstraints.UNDEFINED org​.eclipse​.elk​.portConstraints
Port Index int <not defined> org​.eclipse​.elk​.port​.index
Port Label Placement PortLabelPlacement PortLabelPlacement.OUTSIDE org​.eclipse​.elk​.portLabels​.placement
Port Side PortSide PortSide.UNDEFINED org​.eclipse​.elk​.port​.side
Port Spacing double 10 org​.eclipse​.elk​.spacing​.portPort
Position KVector <not defined> org​.eclipse​.elk​.position
Post Compaction Constraint Calculation ConstraintCalculationStrategy ConstraintCalculationStrategy.SCANLINE org​.eclipse​.elk​.layered​.compaction​.postCompaction​.constraints
Post Compaction Strategy GraphCompactionStrategy GraphCompactionStrategy.NONE org​.eclipse​.elk​.layered​.compaction​.postCompaction​.strategy
Priority int 0 org​.eclipse​.elk​.priority
Randomization Seed int 1 org​.eclipse​.elk​.randomSeed
Sausage Folding boolean false org​.eclipse​.elk​.layered​.sausageFolding
Semi-Interactive Crossing Minimization boolean false org​.eclipse​.elk​.layered​.crossingMinimization​.semiInteractive
Separate Connected Components boolean true org​.eclipse​.elk​.separateConnectedComponents
Shortness Priority int 0 org​.eclipse​.elk​.layered​.priority​.shortness
Sloppy Spline Layer Spacing Factor double 0.4 org​.eclipse​.elk​.layered​.edgeRouting​.sloppySplineLayerSpacing
Sloppy Spline Routing boolean true org​.eclipse​.elk​.layered​.edgeRouting​.sloppySplineRouting
Spline Self-Loop Placement SelfLoopPlacement SelfLoopPlacement.NORTH_STACKED org​.eclipse​.elk​.layered​.edgeRouting​.selfLoopPlacement
Straightness Priority int 0 org​.eclipse​.elk​.layered​.priority​.straightness
Thoroughness int 7 org​.eclipse​.elk​.layered​.thoroughness
Upper Bound On Width [MinWidth Layerer] int 4 org​.eclipse​.elk​.layered​.layering​.minWidth​.upperBoundOnWidth
Upper Layer Estimation Scaling Factor [MinWidth Layerer] int 2 org​.eclipse​.elk​.layered​.layering​.minWidth​.upperLayerEstimationScalingFactor
Wide Nodes on Multiple Layers WideNodesStrategy WideNodesStrategy.OFF org​.eclipse​.elk​.layered​.layering​.wideNodesOnMultipleLayers