Table of Contents

Class LinearInterpolation

Namespace
NanoQL.Numerics
Assembly
NanoQL.dll

Linear interpolation between discrete points.

public sealed class LinearInterpolation : Interpolation
Inheritance
LinearInterpolation
Inherited Members
Extension Methods

Remarks

It copies its inputs, as every Interpolation does.

Constructors

LinearInterpolation(ReadOnlySpan<double>, ReadOnlySpan<double>)

Initializes a new instance of the LinearInterpolation class.

public LinearInterpolation(ReadOnlySpan<double> x, ReadOnlySpan<double> y)

Parameters

x ReadOnlySpan<double>

The x values, which must be sorted; at least 2.

y ReadOnlySpan<double>

The y values, one per x value.

Exceptions

ArgumentException

The sizes differ, or there are fewer than 2 points.

Methods

DerivativeCore(double)

The first derivative at a point, after the range check.

protected override double DerivativeCore(double x)

Parameters

x double

The point.

Returns

double

The derivative.

PrimitiveCore(double)

The primitive at a point, after the range check.

protected override double PrimitiveCore(double x)

Parameters

x double

The point.

Returns

double

The primitive.

SecondDerivativeCore(double)

The second derivative at a point, after the range check.

protected override double SecondDerivativeCore(double x)

Parameters

x double

The 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

x double

The point.

Returns

double

The value.