Interval Structure
Represents an interval of real numbers.
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
Remarks
Use the Interval structure to represent an interval of real numbers. The LowerBound and UpperBound properties return the bounds of the interval. The Width property returns the width of the interval. The Contains(Double) method determines whether a value is contained within an interval.
Arithmetic operators are defined for combining intervals. For languages that do not support operator overloading, equivalent static methods have been supplied.
Interval structures are immutable. The lower and upper bounds can not be changed. Use the constructor or one of the operator methods to create an Interval with new values for the boundaries.
Constructors
Interval | Constructs a new interval. |
Properties
Center | Gets the center of the interval. |
Lower | Gets the lower bound of the interval. |
Upper | Gets the upper bound of the interval. |
Width | Gets the width of the interval. |
Methods
Add( | Returns an interval shifted by a specified value.. |
Add( | Returns the sum of two intervals. |
Add( | Returns an interval shifted by a specified value.. |
Contains | Tests whether a number is contained in the interval. |
Divide | Returns a scaled 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) |
Multiply( | Returns a scaled interval. |
Multiply( | Returns a scaled interval. |
Subtract( | Returns an interval negated and shifted to the right by a specified value. |
Subtract( | Returns the sum of two intervals. |
Subtract( | Returns an interval shifted to the left by a specified value. |
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
Addition( | Returns an interval shifted by a specified value.. |
Addition( | Returns the sum of two intervals. |
Addition( | Returns an interval shifted by a specified value.. |
Division( | Returns a scaled interval. |
Equality( | Returns whether two instances of Interval are equal. |
Implicit(Interval to Interval<Double>) | Implicitly converts a specialized interval of real numbers to a generic interval. |
Implicit(Interval<Double> to Interval) | Implicitly converts a generic interval of real numbers to a specialized interval. |
Inequality( | Returns whether two instances of Interval are not equal. |
Multiply( | Returns a scaled interval. |
Multiply( | Returns a scaled interval. |
Subtraction( | Returns an interval negated and shifted to the right by a specified value. |
Subtraction( | Returns the sum of two intervals. |
Subtraction( | Returns an interval shifted to the left by a specified value. |