Interval2D Class |
Namespace: Algs4Net
public class Interval2D : BasicVisual
The Interval2D type exposes the following members.
Name | Description | |
---|---|---|
Interval2D |
Initializes a two-dimensional interval. |
Name | Description | |
---|---|---|
Area |
Returns the area of this two-dimensional interval. | |
Contains |
Does this two-dimensional interval contain the point p? | |
Draw |
Draws this two-dimensional interval to the display. (Overrides BasicVisualDraw.) | |
Equals |
Does this interval equal the other interval? (Overrides ObjectEquals(Object).) | |
GetHashCode |
Returns an integer hash code for this interval. (Overrides ObjectGetHashCode.) | |
Intersects |
Does this two-dimensional interval intersect that two-dimensional interval? | |
MainTest |
Demo test the Interval2D data type. | |
ToString |
Returns a string representation of this two-dimensional interval. (Overrides ObjectToString.) |
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 Interval2D implementation by the respective authors.