Interval<T> Structure
Represents an interval of ordered values.
Definition
Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.4
C#
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.4
[SerializableAttribute]
public struct Interval<T> : IEquatable<Interval<T>>,
IComparable<Interval<T>>
- Implements
- IComparable<Interval<T>>, IEquatable<Interval<T>>
Type Parameters
- T
Remarks
Use the Interval<T> structure to represent an interval of ordered values. The type of the values must support the IComparable<T> interface.
The LowerBound and UpperBound properties return the bounds of the interval. The Contains(T) method determines whether a value is contained within an interval.
Constructors
Interval<T> | Constructs a new interval. |
Properties
Lower | Gets the lower bound of the interval. |
Upper | Gets the upper bound of the interval. |
Width | Gets the width of the interval. |
Methods
Compare | Compares two intervals. |
Contains | Tests whether an object is contained in the interval. |
Equals( | Returns whether this interval is equal to another interval. |
Equals( |
Returns whether this instance is equal to a specified object.
(Overrides ValueType.Equals(Object)) |
Get |
Returns the hash code for this instance.
(Overrides ValueType.GetHashCode()) |
Get | Gets the Type of the current instance. (Inherited from Object) |
ToString() |
Gets a string representation of the interval.
(Overrides ValueType.ToString()) |
ToString( | Gets a string representation of the interval. |
ToString( | Gets a string representation of the interval. |
Operators
Equality( | Returns whether two instances of Interval<T> are equal. |
Inequality( | Returns whether two instances of Interval<T> are not equal. |