Interpolation Class

Provides static methods for quick interpolation of tabulated data.

Definition

Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.1.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.
GridCubic2DInterpolator(IReadOnlyList<IReadOnlyList<Double>>, IReadOnlyList<Double>, ExtrapolationMode) Creates a grid-based cubic spline interpolator over a 2D rectilinear grid.
GridCubic2DInterpolator(IReadOnlyList<Double>, IReadOnlyList<Double>, Matrix<Double>, ExtrapolationMode) Creates a grid-based cubic spline interpolator over a 2D rectilinear grid.
GridCubic2DInterpolator(IReadOnlyList<Double>, IReadOnlyList<Double>, Double[,], ExtrapolationMode) Creates a grid-based cubic spline interpolator over a 2D rectilinear grid.
GridCubic3DInterpolator(IReadOnlyList<IReadOnlyList<Double>>, IReadOnlyList<Double>, ExtrapolationMode) Creates a grid-based cubic spline interpolator over a 3D rectilinear grid.
GridCubic3DInterpolator(IReadOnlyList<Double>, IReadOnlyList<Double>, IReadOnlyList<Double>, ExtrapolationMode) Creates a grid-based cubic spline interpolator over a 2D rectilinear grid.
GridCubic3DInterpolator(IReadOnlyList<Double>, IReadOnlyList<Double>, IReadOnlyList<Double>, IReadOnlyList<Double>, ExtrapolationMode) Creates a grid-based cubic spline interpolator over a 3D rectilinear grid.
GridCubic3DInterpolator(IReadOnlyList<Double>, IReadOnlyList<Double>, IReadOnlyList<Double>, Double[,,], ExtrapolationMode) Creates a grid-based cubic spline interpolator over a 3D rectilinear grid.
GridCubicTensorSplineInterpolator(IReadOnlyList<IReadOnlyList<Double>>, IReadOnlyList<Double>, GridBoundaryCondition, ExtrapolationMode) Creates a grid-based cubic interpolator over an N-dimensional rectilinear grid using tensor-product splines.
GridCubicTensorSplineInterpolator(IReadOnlyList<Double>, IReadOnlyList<Double>, Matrix<Double>, GridBoundaryCondition, ExtrapolationMode) Creates a grid-based cubic interpolator over a 2D rectilinear grid using tensor product splines.
GridCubicTensorSplineInterpolator(IReadOnlyList<Double>, IReadOnlyList<Double>, IReadOnlyList<Double>, GridBoundaryCondition, ExtrapolationMode) Creates a grid-based cubic interpolator over a 2D rectilinear grid using tensor product splines.
GridCubicTensorSplineInterpolator(IReadOnlyList<Double>, IReadOnlyList<Double>, Double[,], GridBoundaryCondition, ExtrapolationMode) Creates a grid-based cubic interpolator over a 2D rectilinear grid using tensor product splines.
GridCubicTensorSplineInterpolator(IReadOnlyList<Double>, IReadOnlyList<Double>, IReadOnlyList<Double>, IReadOnlyList<Double>, GridBoundaryCondition, ExtrapolationMode) Creates a grid-based cubic interpolator over a 3D rectilinear grid using tensor product splines.
GridCubicTensorSplineInterpolator(IReadOnlyList<Double>, IReadOnlyList<Double>, IReadOnlyList<Double>, Double[,,], GridBoundaryCondition, ExtrapolationMode) Creates a grid-based cubic interpolator over a 3D rectilinear grid using tensor product splines.
GridLinearInterpolator(IReadOnlyList<IReadOnlyList<Double>>, IReadOnlyList<Double>, ExtrapolationMode) Creates a grid-based linear interpolator over an N-dimensional rectilinear grid.
GridLinearInterpolator(IReadOnlyList<Double>, IReadOnlyList<Double>, Matrix<Double>, ExtrapolationMode) Creates a grid-based linear interpolator over a 2D rectilinear grid.
GridLinearInterpolator(IReadOnlyList<Double>, IReadOnlyList<Double>, IReadOnlyList<Double>, ExtrapolationMode) Creates a grid-based linear interpolator over a 2D rectilinear grid.
GridLinearInterpolator(IReadOnlyList<Double>, IReadOnlyList<Double>, Double[,], ExtrapolationMode) Creates a grid-based linear interpolator over a 2D rectilinear grid.
GridLinearInterpolator(IReadOnlyList<Double>, IReadOnlyList<Double>, IReadOnlyList<Double>, IReadOnlyList<Double>, ExtrapolationMode) Creates a grid-based linear interpolator over a 3D rectilinear grid.
GridLinearInterpolator(IReadOnlyList<Double>, IReadOnlyList<Double>, IReadOnlyList<Double>, Double[,,], ExtrapolationMode) Creates a grid-based linear interpolator over a 3D rectilinear grid.
GridNearestInterpolator(IReadOnlyList<IReadOnlyList<Double>>, IReadOnlyList<Double>, ExtrapolationMode) Creates a grid-based nearest-neighbor interpolator over an N-dimensional rectilinear grid.
GridNearestInterpolator(IReadOnlyList<Double>, IReadOnlyList<Double>, Matrix<Double>, ExtrapolationMode) Creates a grid-based nearest-neighbor interpolator over a 2D rectilinear grid.
GridNearestInterpolator(IReadOnlyList<Double>, IReadOnlyList<Double>, IReadOnlyList<Double>, ExtrapolationMode) Creates a grid-based nearest-neighbor interpolator over a 2D rectilinear grid.
GridNearestInterpolator(IReadOnlyList<Double>, IReadOnlyList<Double>, Double[,], ExtrapolationMode) Creates a grid-based nearest-neighbor interpolator over a 2D rectilinear grid.
GridNearestInterpolator(IReadOnlyList<Double>, IReadOnlyList<Double>, IReadOnlyList<Double>, IReadOnlyList<Double>, ExtrapolationMode) Creates a grid-based nearest-neighbor interpolator over a 3D rectilinear grid.
GridNearestInterpolator(IReadOnlyList<Double>, IReadOnlyList<Double>, IReadOnlyList<Double>, Double[,,], ExtrapolationMode) Creates a grid-based nearest-neighbor interpolator over a 3D rectilinear grid.
InverseLinear(Double[], Double[], Double) Performs inverse linear interpolation to find the x-coordinate for a given y-value.
InverseLinear(ReadOnlySpan<Double>, ReadOnlySpan<Double>, Double, ExtrapolationMode) 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.
ScatteredLinear2DInterpolator(Double[,], Double[], ExtrapolationMode) Creates a linear interpolator for 2D scattered data from a 2D array of points.
ScatteredLinear2DInterpolator(Matrix<Double>, Vector<Double>, ExtrapolationMode) Creates a linear interpolator for 2D scattered data from a matrix of points.
ScatteredLinear2DInterpolator(Double[], Double[], Double[], ExtrapolationMode) Creates a linear interpolator for 2D scattered data using array inputs.
ScatteredLinear2DInterpolator(Vector<Double>, Vector<Double>, Vector<Double>, ExtrapolationMode) Creates a linear interpolator for 2D scattered data using Delaunay triangulation.
ScatteredNearestInterpolator(Double[,], Double[]) Creates a nearest-neighbor interpolator for scattered N-dimensional data.
ScatteredNearestInterpolator(IReadOnlyList<Vector<Double>>, Vector<Double>) Creates a nearest-neighbor interpolator for scattered N-dimensional data.
ScatteredNearestInterpolator(Matrix<Double>, Vector<Double>) Creates a nearest-neighbor interpolator for scattered N-dimensional data.
ScatteredNearestInterpolator(Double[], Double[], Double[]) Creates a nearest-neighbor interpolator for scattered 2D data using array inputs.
ScatteredNearestInterpolator(Vector<Double>, Vector<Double>, Vector<Double>) Creates a nearest-neighbor interpolator for scattered 2D data.
ScatteredNearestInterpolator(Double[], Double[], Double[], Double[]) Creates a nearest-neighbor interpolator for scattered 3D data using array inputs.
ScatteredNearestInterpolator(Vector<Double>, Vector<Double>, Vector<Double>, Vector<Double>) Creates a nearest-neighbor interpolator for scattered 3D data.
ScatteredRbfInterpolator(Double[,], Double[], RbfOptions) Creates a radial basis function (RBF) interpolator for scattered N-dimensional data.
ScatteredRbfInterpolator(IReadOnlyList<Vector<Double>>, Vector<Double>, RbfOptions) Creates a radial basis function (RBF) interpolator for scattered N-dimensional data.
ScatteredRbfInterpolator(Matrix<Double>, Vector<Double>, RbfOptions) Creates a radial basis function (RBF) interpolator for scattered N-dimensional data.
ScatteredRbfInterpolator(Double[], Double[], Double[], RbfOptions) Creates a radial basis function (RBF) interpolator for scattered 2D data using array inputs.
ScatteredRbfInterpolator(Vector<Double>, Vector<Double>, Vector<Double>, RbfOptions) Creates a radial basis function (RBF) interpolator for scattered 2D data.
ScatteredRbfInterpolator(Double[], Double[], Double[], Double[], RbfOptions) Creates a radial basis function (RBF) interpolator for scattered 3D data using array inputs.
ScatteredRbfInterpolator(Vector<Double>, Vector<Double>, Vector<Double>, Vector<Double>, RbfOptions) Creates a radial basis function (RBF) interpolator for scattered 3D data.

See Also