Interval1D Class |
Namespace: Algs4Net
public class Interval1D
The Interval1D type exposes the following members.
Name | Description | |
---|---|---|
![]() | Interval1D |
Initializes a closed interval [min, max]. |
Name | Description | |
---|---|---|
![]() | Length |
Returns the length of this interval. |
![]() | Max |
Returns the max endpoint of this interval. |
![]() | Min |
Returns the min endpoint of this interval. |
Name | Description | |
---|---|---|
![]() | Contains |
Returns true if this interval contains the specified value. |
![]() | Equals |
Compares this transaction to the specified object. (Overrides ObjectEquals(Object).) |
![]() | GetHashCode |
Returns an integer hash code for this interval. (Overrides ObjectGetHashCode.) |
![]() | Intersects |
Returns true if this interval intersects the specified interval. |
![]() ![]() | MainTest |
Demo test the Interval1D data type. |
![]() | ToString |
Returns a string representation of this interval. (Overrides ObjectToString.) |
Name | Description | |
---|---|---|
![]() ![]() | LENGTH_ORDER |
Compares two intervals by length. |
![]() ![]() | MAX_ENDPOINT_ORDER |
Compares two intervals by max endpoint. |
![]() ![]() | MIN_ENDPOINT_ORDER |
Compares two intervals by min endpoint. |
For additional documentation, see Section 1.2 of Algorithms, 4th Edition by Robert Sedgewick and Kevin Wayne.
This class is a C# port from the original Java class Interval1D implementation by the respective authors.