Remarks
Each edge that should be routed has to be specified by a unique key (e.g., the edge itself) as well as two points that represent the two endpoints of this edge, see addSegment. The orthogonal route of each edge consists of three segments. More precisely, for an edge with source point (sx,sy), target point (tx,ty) and VERTICAL channel orientation, the algorithm calculates the x-coordinate of the vertical middle segment (called mx) that can be obtained with method getChannelCoordinate after routing the edges. Hence, the actual route consists of points (sx,sy), (mx,sy), (mx,ty) and (tx,ty). Analogously, if the channel orientation is HORIZONTAL, the route consists of the points (sx,sy), (sx,my), (tx,my) and (tx,ty).
Besides the orientation, each channel is restricted by a smallest and largest assignable coordinate. If, for example, the orientation is VERTICAL, the calculated x-coordinate of the middle segment lies between these two values. Both values can be changed by means of method setChannel.
All edges assigned to the same coordinate are said to lie in the same sub-channel. In general, the routing algorithm tries to assign coordinates such the number of sub-channels as well as the number of edge crossings is small.
Default Values of Properties
| Name | Default |
|---|---|
| epsilon | 0.5 |
| ignoreEpsilonChannel | true |
Members
Constructors
Creates a new instance of ChannelRoutingTool.
Parameters
- min: number
- The smallest assignable coordinate within the channel.
- max: number
- The largest assignable coordinate within the channel.
- orientation?: ChannelOrientation
- The orientation of the channel. If omitted, the default value is HORIZONTAL.
Properties
Property Value
Default Value
See Also
Methods
Parameters
- groupId: any
- the group id used during adding
Return Value
- boolean
trueif the key has already been registered,falseotherwise
Parameters
- key: any
- the key used during adding
Return Value
- boolean
trueif the key has already been registered,falseotherwise
Parameters
- key: any
- the key used during adding the edge object
Return Value
- number
- the channel coordinate of the associated edge object
See Also
API
- addSegment
Parameters
- groupId: any
- the group id used during adding an edge object
Return Value
- number
- the sub-channel rank of the edge group
See Also
Parameters
- key: any
- the key used during adding the edge object
Return Value
- number
- the sub-channel rank of the given edge object
See Also
See Also
Specifies the channel bounds and orientation.
Parameters
- min: number
- The smallest assignable coordinate within the channel.
- max: number
- The largest assignable coordinate within the channel.
- orientation?: ChannelOrientation
- The orientation of the channel. If omitted, the default value is HORIZONTAL.
See Also
API
- addSegment