Piecewise Curve.Index Of Method
Finds the index of the lower bound of the interval that contains the specfied value.
Definition
Namespace: Numerics.NET.Curves
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.3
C#
A number in the range -1 to NumberOfIntervals.
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.3
public int IndexOf(
double x
)
Parameters
- x Double
- A real number.
Return Value
Int32A number in the range -1 to NumberOfIntervals.
Remarks
If x is less than the lower bound of the first interval, the value -1 is returned. If x is greater than or equal to the upper bound of the last interval, the value NumberOfIntervals is returned. In all other cases, the value returned is the index of the interval whose lower bound is less than or equal to x, and whose upper bound is strictly greater than x.