Interpolation Class

Provides static methods for quick interpolation of tabulated data.

Definition

Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.0.0
C#
public static class Interpolation
Inheritance
Object  →  Interpolation

Remarks

The Interpolation class provides a set of static methods for fast, single-point evaluation of common interpolation schemes. These methods operate directly on arrays and perform no allocations, making them suitable for performance-critical scenarios where a reusable curve object is not needed.

For scenarios requiring repeated evaluation, resampling, or additional operations like differentiation and integration, use the curve generator factory methods that return concrete curve types from the Numerics.NET.Curves namespace.

Methods

Akima Performs Akima spline interpolation at a single point.
AkimaSpline Creates an Akima cubic spline curve from the specified data points.
Circular Performs circular/angular linear interpolation at a single point.
CircularLinearCurve(Double[], Double[], Boolean) Creates a piecewise linear interpolating curve for circular/angular data.
CircularLinearCurve(ReadOnlySpan<Double>, ReadOnlySpan<Double>, Boolean) Creates a piecewise linear interpolating curve for circular/angular data.
Cubic Performs natural cubic spline interpolation at a single point.
CubicSpline(Double[], Double[]) Creates a natural cubic spline curve from the specified data points.
CubicSpline(Double[], Double[], CubicSplineKind) Creates a cubic spline curve from the specified data points with the specified spline kind.
InverseLinear(Double[], Double[], Double) Performs inverse linear interpolation to find the x-coordinate for a given y-value.
InverseLinear(ReadOnlySpan<Double>, ReadOnlySpan<Double>, Double, OutOfRangeMode) Performs inverse linear interpolation to find the x-coordinate for a given y-value.
InverseLinearAfter(Double[], Double[], Double, Double) Performs inverse linear interpolation to find the smallest x-coordinate ≥ a reference value where the interpolated curve equals a given y-value.
InverseLinearAfter(ReadOnlySpan<Double>, ReadOnlySpan<Double>, Double, Double) Performs inverse linear interpolation to find the smallest x-coordinate ≥ a reference value where the interpolated curve equals a given y-value.
InverseLinearBefore(Double[], Double[], Double, Double) Performs inverse linear interpolation to find the largest x-coordinate ≤ a reference value where the interpolated curve equals a given y-value.
InverseLinearBefore(ReadOnlySpan<Double>, ReadOnlySpan<Double>, Double, Double) Performs inverse linear interpolation to find the largest x-coordinate ≤ a reference value where the interpolated curve equals a given y-value.
InverseLinearNear(Double[], Double[], Double, Double) Performs inverse linear interpolation to find the x-coordinate closest to a reference value where the interpolated curve equals a given y-value.
InverseLinearNear(ReadOnlySpan<Double>, ReadOnlySpan<Double>, Double, Double) Performs inverse linear interpolation to find the x-coordinate closest to a reference value where the interpolated curve equals a given y-value.
Linear Performs linear interpolation at a single point.
LogitLinear Performs logit-linear interpolation at a single point.
LogitLinearCurve(Double[], Double[]) Creates a piecewise linear interpolating curve with logit transformation on the y-axis.
LogitLinearCurve(ReadOnlySpan<Double>, ReadOnlySpan<Double>) Creates a piecewise linear interpolating curve with logit transformation on the y-axis.
LogLinear Performs log-linear interpolation at a single point.
LogLinearCurve(Double[], Double[]) Creates a piecewise linear interpolating curve with logarithmic x-axis scaling.
LogLinearCurve(ReadOnlySpan<Double>, ReadOnlySpan<Double>) Creates a piecewise linear interpolating curve with logarithmic x-axis scaling.
LogLog Performs log-log interpolation at a single point.
LogLogCurve(Double[], Double[]) Creates a piecewise linear interpolating curve with logarithmic scaling on both axes.
LogLogCurve(ReadOnlySpan<Double>, ReadOnlySpan<Double>) Creates a piecewise linear interpolating curve with logarithmic scaling on both axes.
MonotoneCubic Performs monotone cubic spline interpolation at a single point.
MonotoneCubicSpline Creates a monotone cubic spline curve from the specified data points.
Nearest Performs nearest-neighbor interpolation at a single point.
Next Performs next-value (step right) interpolation at a single point.
Periodic Performs periodic linear interpolation at a single point.
PeriodicLinearCurve(Double[], Double[], Double) Creates a periodic piecewise linear interpolating curve.
PeriodicLinearCurve(ReadOnlySpan<Double>, ReadOnlySpan<Double>, Double) Creates a periodic piecewise linear interpolating curve.
PiecewiseConstantCurve Creates a piecewise constant curve from the specified data points.
PiecewiseLinearCurve Creates a piecewise linear curve from the specified data points.
Previous Performs previous-value (step left) interpolation at a single point.
Resample Resamples an interpolator at the specified x-coordinates.
ResampleInto Resamples an interpolator at the specified x-coordinates into a pre-allocated buffer.

See Also