Crystal AI
1.0.0
|
Represents an interval of the form [a, b] or (a, b) or any combination of exclusive and inclusive end points. More...
Public Member Functions | |
bool | Contains (T point) |
Check if given point lies within the interval. More... | |
override string | ToString () |
Convert to mathematical notation using open and closed parenthesis: (, ), [, and ]. More... | |
Interval (T lowerbound, T upperbound, IntervalType lowerboundIntervalType=IntervalType.Closed, IntervalType upperboundIntervalType=IntervalType.Closed) | |
Initializes a new instance of the Interval<T> struct. More... | |
Static Public Member Functions | |
static Interval< int > | Create (int lowerbound, int upperbound, IntervalType lowerboundIntervalType=IntervalType.Closed, IntervalType upperboundIntervalType=IntervalType.Closed) |
Creates an interval of integers. More... | |
static Interval< float > | Create (float lowerbound, float upperbound, IntervalType lowerboundIntervalType=IntervalType.Closed, IntervalType upperboundIntervalType=IntervalType.Closed) |
Creates an interval of single precision floating point numbers. More... | |
static Interval< double > | Create (double lowerbound, double upperbound, IntervalType lowerboundIntervalType=IntervalType.Closed, IntervalType upperboundIntervalType=IntervalType.Closed) |
Creates an interval of double precision floating point numbers. More... | |
Properties | |
T | LowerBound [get] |
Lower bound of the interval. More... | |
T | UpperBound [get] |
Upper bound of the interval. More... | |
IntervalType | LowerBoundType [get] |
The type of the lower bound of this interval. This can either be F:Crystal.IntervalType.Open or F:Crystal.IntervalType.Closed. More... | |
IntervalType | UpperBoundType [get] |
The type of the upper bound of this interval. This can either be F:Crystal.IntervalType.Open or F:Crystal.IntervalType.Closed. More... | |
Represents an interval of the form [a, b] or (a, b) or any combination of exclusive and inclusive end points.
Static class to generate regular Intervals using common types.
This is a vector-less interval, therefore if the end element is larger than the start element, the interval will swap the two ends around such that a is always lt; b.
T | : | struct | |
T | : | IComparable |
|
inline |
Initializes a new instance of the Interval<T> struct.
lowerbound | The lower bound. |
upperbound | The upper bound. |
lowerboundIntervalType | Type of the lower bound of the interval. |
upperboundIntervalType | Type of the upper bound of the interval. |
|
inline |
Check if given point lies within the interval.
point | Point to check |
|
inlinestatic |
Creates an interval of integers.
lowerbound | The lower bound. |
upperbound | The upper bound. |
lowerboundIntervalType | Type of the lower bound of the interval. |
upperboundIntervalType | Type of the upper bound of the interval. |
|
inlinestatic |
Creates an interval of single precision floating point numbers.
lowerbound | The lower bound. |
upperbound | The upper bound. |
lowerboundIntervalType | Type of the lower bound of the interval. |
upperboundIntervalType | Type of the upper bound of the interval. |
|
inlinestatic |
Creates an interval of double precision floating point numbers.
lowerbound | The lower bound. |
upperbound | The upper bound. |
lowerboundIntervalType | Type of the lower bound of the interval. |
upperboundIntervalType | Type of the upper bound of the interval. |
|
inline |
Convert to mathematical notation using open and closed parenthesis: (, ), [, and ].
|
get |
Lower bound of the interval.
|
get |
The type of the lower bound of this interval. This can either be F:Crystal.IntervalType.Open or F:Crystal.IntervalType.Closed.
|
get |
Upper bound of the interval.
|
get |
The type of the upper bound of this interval. This can either be F:Crystal.IntervalType.Open or F:Crystal.IntervalType.Closed.