A horizontal or vertical Interval that additionally stores a y- (in the horizontal case) or x-coordinate (in the vertical case).
Inheritance Hierarchy
Remarks
During the path search of the EdgeRouter, orthogonal intervals are used for specifying the location where an edge enters or exits a PartitionCell.
Members
No filters for this type
Constructors
Creates a new OrthogonalInterval instance with the given interval bounds.
Creates a new OrthogonalInterval instance with the given interval bounds.
Parameters
- from: number
- the start of the interval bounds
- to: number
- the end of the interval bounds
- location: number
- the location in the two-dimensional coordinate system
- isVertical: boolean
trueif the orthogonal interval is vertical,falseif it is horizontal
Throws
- Exception ({ name: 'ArgumentError' })
- if the given range is
null
Properties
Gets the center of this OrthogonalInterval in the 2D-coordinate system.
Gets the center of this OrthogonalInterval in the 2D-coordinate system.
readonlyfinal
Property Value
the center of this orthogonal interval in the 2D-coordinate system
readonlyfinal
Property Value
the vertical coordinate for horizontal intervals or the horizontal coordinate for vertical intervals, respectively
Gets the upper bound of the OrthogonalInterval.
Gets the upper bound of the OrthogonalInterval.
readonlyfinal
Property Value
the upper bound of the orthogonal interval
Gets the lower bound of the OrthogonalInterval.
Gets the lower bound of the OrthogonalInterval.
readonlyfinal
Property Value
the lower bound of the orthogonal interval
Gets the range of this OrthogonalInterval.
Gets the range of this OrthogonalInterval.
readonlyfinal
Property Value
the range of this orthogonal interval
Gets the length of the OrthogonalInterval.
Gets the length of the OrthogonalInterval.
Gets whether or not the OrthogonalInterval is oriented vertically.
Gets whether or not the OrthogonalInterval is oriented vertically.
readonlyfinal
Property Value
true if the orthogonal interval is oriented vertically, false otherwiseMethods
Checks whether or not this OrthogonalInterval is fully covered by the given OrthogonalInterval.
Checks whether or not this OrthogonalInterval is fully covered by the given OrthogonalInterval.
The given orthogonal interval covers this orthogonal interval, if this interval's range is covered by the given interval's range. The location of both orthogonal intervals is ignored. The orthogonal intervals must have the same orientation.
final
Parameters
- other: OrthogonalInterval
- the other orthogonal interval
Return Value
- boolean
trueif this orthogonal interval is fully covered by the other orthogonal interval,falseotherwise
Throws
- Exception ({ name: 'ArgumentError' })
- if the orthogonal intervals have different orientations
See Also
Determines whether or not this OrthogonalInterval crosses the given one.
Determines whether or not this OrthogonalInterval crosses the given one.
The orthogonal intervals must have different orientations.
final
Parameters
- other: OrthogonalInterval
- the other orthogonal interval
Return Value
- boolean
trueif this orthogonal interval crosses the given one,falseotherwise
Throws
- Exception ({ name: 'ArgumentError' })
- if the given orthogonal intervals have the same orientation
The orthogonal intervals must have the same orientation.
final
Parameters
- other: OrthogonalInterval
- the other orthogonal interval
Return Value
- number
0if the orthogonal intervals intersect each other, otherwise the minimal distance between the orthogonal intervals is returned
Throws
- Exception ({ name: 'ArgumentError' })
- if the orthogonal intervals have different orientations
Checks whether or not this OrthogonalInterval and the given OrthogonalInterval cover the same range.
Checks whether or not this OrthogonalInterval and the given OrthogonalInterval cover the same range.
If both orthogonal intervals cover the same range, they are considered the same. The location of both orthogonal intervals is ignored. The orthogonal intervals must have the same orientation.
final
Parameters
- other: OrthogonalInterval
- the other orthogonal interval
Return Value
- boolean
trueif the orthogonal intervals cover the same range,falseotherwise
Throws
- Exception ({ name: 'ArgumentError' })
- if the orthogonal intervals have different orientations
See Also
Checks whether or not this OrthogonalInterval intersects the given OrthogonalInterval and the intersection has a given minimum intersection size.
Checks whether or not this OrthogonalInterval intersects the given OrthogonalInterval and the intersection has a given minimum intersection size.
Orthogonal intervals intersect each other if their ranges intersect each other by at least the given minimum intersection size. The location of both orthogonal intervals is ignored. The orthogonal intervals must have the same orientation.
final
Parameters
- other: OrthogonalInterval
- the other orthogonal interval
- minIntersection?: number
- the minimum size of the intersection
Return Value
- boolean
trueif this interval intersects the given other orthogonal interval,falseotherwise
Throws
- Exception ({ name: 'ArgumentError' })
- if the orthogonal intervals have different orientations
See Also
Returns the Manhattan distance of this OrthogonalInterval and the given OrthogonalInterval.
Returns the Manhattan distance of this OrthogonalInterval and the given OrthogonalInterval.
If both intervals have the same orientation, the Manhattan distance is the sum of the distance between the intervals' ranges and the distance between the intervals' locations.
If the intervals have different orientations, the Manhattan distance is the sum of the distances between one interval's range and the other interval's location.
final
Parameters
- other: OrthogonalInterval
- the other orthogonal interval
Return Value
- number
- the Manhattan distance between this interval and the given one
Returns a string representation of this OrthogonalInterval object.
Returns a string representation of this OrthogonalInterval object.
Static Methods
Calculates the intersection of the given OrthogonalIntervals.
Calculates the intersection of the given OrthogonalIntervals.
If the returned orthogonal interval is vertical, it will have the same horizontal location as
i2 and the shared vertical range of both intervals. If it is horizontal, it will have the same vertical location as i2 and the shared horizontal range of both intervals. The orthogonal intervals must have the same orientation.static
Parameters
- i1: OrthogonalInterval
- the first orthogonal interval
- i2: OrthogonalInterval
- the second orthogonal interval
Return Value
- OrthogonalInterval
- the shared orthogonal interval of both given orthogonal intervals
Throws
- Exception ({ name: 'ArgumentError' })
- if the orthogonal intervals have different orientations
See Also
API
- intersects
Calculates the union of the given OrthogonalIntervals.
Calculates the union of the given OrthogonalIntervals.
If the returned orthogonal interval is vertical, it will have the same horizontal location as
i2 and the shared vertical range of both orthogonal intervals. If it is horizontal, it will have the same vertical location as i2 and the shared vertical range of both orthogonal intervals. The orthogonal intervals must have the same orientation.static
Parameters
- i1: OrthogonalInterval
- the first orthogonal interval
- i2: OrthogonalInterval
- the second orthogonal interval
Return Value
- OrthogonalInterval
- the union of both given orthogonal intervals
Throws
- Exception ({ name: 'ArgumentError' })
- if the orthogonal intervals have different orientations
See Also
API
- intersects