Class BackwardFlatInterpolation
Backward-flat interpolation between discrete points: on each interval (xi, xi+1] the value is yi+1, and below x0 it is y0.
public sealed class BackwardFlatInterpolation : Interpolation
- Inheritance
-
BackwardFlatInterpolation
- Inherited Members
- Extension Methods
Remarks
It copies its inputs, as every Interpolation does.
Constructors
BackwardFlatInterpolation(ReadOnlySpan<double>, ReadOnlySpan<double>)
Initializes a new instance of the BackwardFlatInterpolation class.
public BackwardFlatInterpolation(ReadOnlySpan<double> x, ReadOnlySpan<double> y)
Parameters
xReadOnlySpan<double>The x values, which must be sorted; at least 1.
yReadOnlySpan<double>The y values, one per x value.
Exceptions
- ArgumentException
The sizes differ, or there are no points.
Methods
DerivativeCore(double)
The first derivative at a point, after the range check.
protected override double DerivativeCore(double x)
Parameters
xdoubleThe point.
Returns
- double
The derivative.
PrimitiveCore(double)
The primitive at a point, after the range check.
protected override double PrimitiveCore(double x)
Parameters
xdoubleThe point.
Returns
- double
The primitive.
SecondDerivativeCore(double)
The second derivative at a point, after the range check.
protected override double SecondDerivativeCore(double x)
Parameters
xdoubleThe point.
Returns
- double
The second derivative.
ValueCore(double)
The interpolated value at a point, after the range check.
protected override double ValueCore(double x)
Parameters
xdoubleThe point.
Returns
- double
The value.