- I
Remarks
Instances of this class can be set using property portCandidateSelector.
This implementation will query sourcePortCandidates, targetPortCandidates and nodePortCandidates. It will try to assign each edge one of the matching LayoutPortCandidates considering their cost without introducing too many crossings and without violating the capacity constraints.
Default Values of Properties
| Name | Default | Description |
|---|---|---|
| backLoopCost | 1.0 | |
| crossingCost | 10.0d | |
| deterministic | true | A deterministic algorithm will be applied. |
| overUsageCost | 100.0d |
See Also
Members
Constructors
Creates a new instance of PortCandidateSelector with the default settings.
Properties
Property Value
Throws
- Exception ({ name: 'ArgumentError' })
- if the back-loop cost is negative
Default Value
Gets or sets the cost associated with a crossing that would occur if a given combination of LayoutPortCandidates would be chosen.
Property Value
Throws
- Exception ({ name: 'ArgumentError' })
- if the crossing cost is negative
Default Value
Gets or sets whether this implementation uses a deterministic algorithm to assign the LayoutPortCandidates.
Property Value
true if a deterministic algorithm should be applied, false otherwiseDefault Value
Gets or sets the cost associated with each edge being assigned to a port which has already reached its capacity.
Property Value
Throws
- Exception ({ name: 'ArgumentError' })
- if the cost is negative
Default Value
See Also
API
- capacity
Methods
insertSameLayerStructures
(graph: LayoutGraph, layoutContext: HierarchicalLayoutContext): PortCandidateSelectorSameLayerDataprotectedInserts a same-layer edge structure for each same-layer edge of the original graph.
insertSameLayerStructures
(graph: LayoutGraph, layoutContext: HierarchicalLayoutContext): PortCandidateSelectorSameLayerData(s,t) consists of a temporary node w and edges (s,w) and (t,w).Parameters
- graph: LayoutGraph
- the input graph
- layoutContext: HierarchicalLayoutContext
- The HierarchicalLayoutContext implementation which provides context information for the graph elements, as well as the ItemFactory that sets the temporary port constraints.
Return Value
- PortCandidateSelectorSameLayerData
- An object that provides information about the inserted same-layer structures.
See Also
Removes the same-layer edge structure created using insertSameLayerStructures.
Parameters
- sameLayerData: PortCandidateSelectorSameLayerData
- A given PortCandidateSelectorSameLayerData instance holding the information about the same-layer structures.
- graph: LayoutGraph
- The input graph
- layoutContext: HierarchicalLayoutContext
- The HierarchicalLayoutContext implementation which provides context information for the graph elements, as well as the ItemFactory that sets the temporary port constraints.
See Also
Assigns new selected port candidates after the layering information has been determined.
Parameters
- graph: LayoutGraph
- The input graph
- layoutContext: HierarchicalLayoutContext
- The HierarchicalLayoutContext containing information about the elements, as well as the ItemFactory instance to set the selected port candidates with.
Assigns new selected port candidates after the sequence of the nodes has been determined.
Parameters
- graph: LayoutGraph
- the input graph
- layoutContext: HierarchicalLayoutContext
- The HierarchicalLayoutContext providing context information about the graph elements, as well as the ItemFactory instance to set the selected port candidates with.
More precisely, it is called after the sequence of the nodes has been determined.
Incoming and outgoing edges are sorted using comparison instances which define the preferred ordering of the incoming and outgoing edges from left to right.
Parameters
- node: LayoutNode
- the original node to set temporary port constraints
- inEdgeOrder: function(LayoutEdge, LayoutEdge): number
- a given comparison instance for incoming edges
- outEdgeOrder: function(LayoutEdge, LayoutEdge): number
- a given comparison instance for outgoing edges
- graph: LayoutGraph
- the input graph
- layoutContext: HierarchicalLayoutContext
- The HierarchicalLayoutContext implementation which provides context information for the graph elements, as well as the ItemFactory that sets the temporary port constraints.
See Also
More precisely, it is called after the sequence of the nodes has been determined.
Incoming and outgoing edges are sorted using comparison instances which define the preferred ordering of the incoming and outgoing edges from left to right.
Parameters
- inEdgeOrder: function(LayoutEdge, LayoutEdge): number
- a given comparison instance for incoming edges
- outEdgeOrder: function(LayoutEdge, LayoutEdge): number
- a given comparison instance for outgoing edges
- graph: LayoutGraph
- the input graph
- layoutContext: HierarchicalLayoutContext
- The HierarchicalLayoutContext implementation which provides context information for the graph elements, as well as the ItemFactory that sets the temporary port constraints.