This class is a ISequencer implementation that performs the second phase of the Sugiyama algorithm.
Remarks
Default Values of Properties
groupTransposition | false | The group transposition rule is disabled. |
maximumDuration | <code>0x7FFFFFFF</code> | The algorithm runs unrestricted. |
randomizationRounds | 50 | The number of randomized rounds is 50 , if the 14 . |
transposition | true | The transposition rule is active. |
weightHeuristic | BARYCENTER
| A barycenter heuristic is used. |
Type Details
- yfiles module
- layout-hierarchic
- yfiles-umd modules
- layout-familytree, layout-hierarchic, layout-radial, layout
- Legacy UMD name
- yfiles.hierarchic.DefaultLayerSequencer
See Also
Constructors
Creates a new instance of DefaultLayerSequencer.
Parameters
A map of options to pass to the method.
- transposition - boolean
Whether or not to apply an additional crossing minimization heuristic. This option sets the transposition property on the created object.
- groupTransposition - boolean
Whether or not an additional crossing minimization heuristic should be used in the presence of grouped graphs. This option sets the groupTransposition property on the created object.
- weightHeuristic - WeightHeuristic
The weight heuristic that should be used. This option sets the weightHeuristic property on the created object.
- maximumDuration - number
The time limit (in milliseconds) set for this sequencer per execution. This option sets the maximumDuration property on the created object.
- randomizationRounds - number
The number of randomized rounds that this algorithm performs, if there was no optimal solution. This option sets the randomizationRounds property on the created object.
Properties
Gets or sets whether or not an additional crossing minimization heuristic should be used in the presence of grouped graphs.
Remarks
Default Value
false
.The group transposition rule is disabled.
Sample Graphs
Gets or sets the time limit (in milliseconds) set for this sequencer per execution.
Remarks
0
.Default Value
<code>0x7FFFFFFF</code>
.The algorithm runs unrestricted.
Throws
- Exception({ name: 'ArgumentError' })
- if the maximum duration is negative.
Gets or sets the number of randomized rounds that this algorithm performs, if there was no optimal solution.
Remarks
0
.Default Value
50
.The number of randomized rounds is 50
, if the 14
.
Throws
- Exception({ name: 'ArgumentError' })
- if a negative value is given
Gets or sets whether or not to apply an additional crossing minimization heuristic.
Remarks
Default Value
true
.The transposition rule is active.
Sample Graphs
Gets or sets the weight heuristic that should be used.
Methods
Returns the cost of an edge crossing between the two given edges.
Remarks
The default implementation defines the crossing cost of two edges as the product of the individual crossing costs which are retrieved from the IDataProvider registered with the graph with key EDGE_CROSSING_COST_DP_KEY. If no individual crossing costs are defined, all edges have a cost of 1
, hence, this method also returns 1
.
This method may be overridden to specify costs for a specific pair of edges. The given ILayoutDataProvider is helpful to determine the type of the edges by using method getEdgeData. Furthermore, using the original edge to decide what a crossing costs might be helpful, see getOriginalEdge.
Parameters
A map of options to pass to the method.
- edge1 - Edge
- the first edge involved in the crossing
- edge2 - Edge
- the second edge involved in the crossing
- layoutDataProvider - ILayoutDataProvider
- the ILayoutDataProvider containing information about the edges and nodes
Returns
- ↪number
- the crossing cost for the two given edges
sequenceNodeLayers
(graph: LayoutGraph, glayers: ILayers, ldp: ILayoutDataProvider, itemFactory: IItemFactory)Calculates the sequence of the nodes within each layer.
Remarks
Parameters
A map of options to pass to the method.
- graph - LayoutGraph
- the input graph
- glayers - ILayers
- the given ILayers instance containing the elements in the layering
- ldp - ILayoutDataProvider
- the ILayoutDataProvider implementation which provides access to the INodeData and IEdgeData instances
- itemFactory - IItemFactory
- the IItemFactory used temporarily for modifying the graph instance