C

OrthogonalInterval

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.

Parameters

range: Interval
the given range
location: number
the location in the two-dimensional coordinate system
isVertical: boolean
true if the orthogonal interval is vertical, false if it is horizontal

Throws

Exception ({ name: 'ArgumentError' })
if the given range is null
Creates a new OrthogonalInterval instance using the from and to values as 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
true if the orthogonal interval is vertical, false if 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.
readonlyfinal

Property Value

the center of this orthogonal interval in the 2D-coordinate system
Gets the vertical coordinate for horizontal intervals or the horizontal coordinate for vertical intervals, respectively.
readonlyfinal

Property Value

the vertical coordinate for horizontal intervals or the horizontal coordinate for vertical intervals, respectively
Gets the upper bound of the OrthogonalInterval.
readonlyfinal

Property Value

the upper bound of the orthogonal interval
Gets the lower bound of the OrthogonalInterval.
readonlyfinal

Property Value

the lower bound of the orthogonal interval
Gets the range of this OrthogonalInterval.
readonlyfinal

Property Value

the range of this orthogonal interval
Gets the length of the OrthogonalInterval.
readonlyfinal

Property Value

the length of the orthogonal interval

See Also

API
size
Gets whether or not the OrthogonalInterval is oriented vertically.
readonlyfinal

Property Value

true if the orthogonal interval is oriented vertically, false otherwise

Methods

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
true if this orthogonal interval is fully covered by the other orthogonal interval, false otherwise

Throws

Exception ({ name: 'ArgumentError' })
if the orthogonal intervals have different orientations

See Also

API
PartitionCell
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
true if this orthogonal interval crosses the given one, false otherwise

Throws

Exception ({ name: 'ArgumentError' })
if the given orthogonal intervals have the same orientation
Returns the distance of the ranges of this OrthogonalInterval and the given OrthogonalInterval.
The orthogonal intervals must have the same orientation.
final

Parameters

other: OrthogonalInterval
the other orthogonal interval

Return Value

number
0 if 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.
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
true if the orthogonal intervals cover the same range, false otherwise

Throws

Exception ({ name: 'ArgumentError' })
if the orthogonal intervals have different orientations

See Also

API
PartitionCell
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
true if this interval intersects the given other orthogonal interval, false otherwise

Throws

Exception ({ name: 'ArgumentError' })
if the orthogonal intervals have different orientations

See Also

API
PartitionCell
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.
final

Return Value

string
A string representation of this OrthogonalInterval object.

Static Methods

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.
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