Interpolation.Grid Cubic Tensor Spline Interpolator Method
Definition
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.1.0
Overload List
GridCubicTensorSplineInterpolator(IReadOnlyList<IReadOnlyList<Double>>, IReadOnlyList<Double>, GridBoundaryCondition, ExtrapolationMode)
public static TensorSplineGridSurface GridCubicTensorSplineInterpolator(
IReadOnlyList<IReadOnlyList<double>> axes,
IReadOnlyList<double> values,
GridBoundaryCondition boundaryCondition = default,
ExtrapolationMode extrapolation = ExtrapolationMode.Throw
)Parameters
- axes IReadOnlyList<IReadOnlyList<Double>>
- The coordinate vectors for each dimension.
- values IReadOnlyList<Double>
- The grid values in flat, row-major storage.
- boundaryCondition GridBoundaryCondition (Optional)
- The boundary condition for handling out-of-range samples when building interpolation stencils. Default is Clamp (clamp to edge).
- extrapolation ExtrapolationMode (Optional)
- The extrapolation mode for out-of-range coordinates.
Return Value
TensorSplineGridSurfaceA TensorSplineGridSurface that performs N-dimensional tensor-product cubic Hermite interpolation.
Remarks
This method creates a general N-dimensional tensor-product spline surface using the cubic Hermite kernel. The interpolation is performed by recursively applying 1D cubic Hermite interpolation along each axis.
Difference from GridCubicInterpolator: While GridCubic2DInterpolator creates specialized 2D/3D surfaces (2D/3D only), this method uses a general tensor-product approach that works for any dimension including 1D, 2D, 3D, and beyond. It also supports custom boundary conditions.
Exceptions
| Argument | axes or values is null. |
| Argument | The product of axis lengths does not equal the values length, or an axis has fewer than 2 points. |
GridCubicTensorSplineInterpolator(IReadOnlyList<Double>, IReadOnlyList<Double>, Matrix<Double>, GridBoundaryCondition, ExtrapolationMode)
public static TensorSplineGridSurface GridCubicTensorSplineInterpolator(
IReadOnlyList<double> xAxis,
IReadOnlyList<double> yAxis,
Matrix<double> values,
GridBoundaryCondition boundaryCondition = default,
ExtrapolationMode extrapolation = ExtrapolationMode.Throw
)Parameters
- xAxis IReadOnlyList<Double>
- The x-coordinates of the grid points.
- yAxis IReadOnlyList<Double>
- The y-coordinates of the grid points.
- values Matrix<Double>
- The grid values as a matrix (RowCount = xAxis.Count, ColumnCount = yAxis.Count).
- boundaryCondition GridBoundaryCondition (Optional)
- The boundary condition for out-of-range samples during construction.
- extrapolation ExtrapolationMode (Optional)
- The extrapolation mode for out-of-range coordinates.
Return Value
TensorSplineGridSurfaceA TensorSplineGridSurface that performs 2D tensor-product cubic Hermite interpolation.
Exceptions
| Argument | xAxis, yAxis, or values is null. |
| Argument | Matrix dimensions do not match axis lengths, or an axis has fewer than 2 points. |
GridCubicTensorSplineInterpolator(IReadOnlyList<Double>, IReadOnlyList<Double>, IReadOnlyList<Double>, GridBoundaryCondition, ExtrapolationMode)
public static TensorSplineGridSurface GridCubicTensorSplineInterpolator(
IReadOnlyList<double> xAxis,
IReadOnlyList<double> yAxis,
IReadOnlyList<double> values,
GridBoundaryCondition boundaryCondition = default,
ExtrapolationMode extrapolation = ExtrapolationMode.Throw
)Parameters
- xAxis IReadOnlyList<Double>
- The x-coordinates of the grid points.
- yAxis IReadOnlyList<Double>
- The y-coordinates of the grid points.
- values IReadOnlyList<Double>
- The grid values in flat, row-major storage.
- boundaryCondition GridBoundaryCondition (Optional)
- The boundary condition for out-of-range samples during construction.
- extrapolation ExtrapolationMode (Optional)
- The extrapolation mode for out-of-range coordinates.
Return Value
TensorSplineGridSurfaceA TensorSplineGridSurface that performs 2D tensor-product cubic Hermite interpolation.
Exceptions
| Argument | xAxis, yAxis, or values is null. |
| Argument | The values length does not match the product of axis lengths, or an axis has fewer than 2 points. |
GridCubicTensorSplineInterpolator(IReadOnlyList<Double>, IReadOnlyList<Double>, Double[,], GridBoundaryCondition, ExtrapolationMode)
public static TensorSplineGridSurface GridCubicTensorSplineInterpolator(
IReadOnlyList<double> xAxis,
IReadOnlyList<double> yAxis,
double[,] values,
GridBoundaryCondition boundaryCondition = default,
ExtrapolationMode extrapolation = ExtrapolationMode.Throw
)Parameters
- xAxis IReadOnlyList<Double>
- The x-coordinates of the grid points.
- yAxis IReadOnlyList<Double>
- The y-coordinates of the grid points.
- values Double[2]
- The grid values as a 2D array.
- boundaryCondition GridBoundaryCondition (Optional)
- The boundary condition for out-of-range samples during construction.
- extrapolation ExtrapolationMode (Optional)
- The extrapolation mode for out-of-range coordinates.
Return Value
TensorSplineGridSurfaceA TensorSplineGridSurface that performs 2D tensor-product cubic Hermite interpolation.
Remarks
Array dimension order
For the values array, the dimension order follows the order of the axis arguments.
The array must satisfy:
- values.GetLength(0) == xAxis.Count
- values.GetLength(1) == yAxis.Count
and values[i, j] = f(xAxis[i], yAxis[j]).
Exceptions
| Argument | xAxis, yAxis, or values is null. |
| Argument | Array dimensions do not match axis lengths, or an axis has fewer than 2 points. |
GridCubicTensorSplineInterpolator(IReadOnlyList<Double>, IReadOnlyList<Double>, IReadOnlyList<Double>, IReadOnlyList<Double>, GridBoundaryCondition, ExtrapolationMode)
public static TensorSplineGridSurface GridCubicTensorSplineInterpolator(
IReadOnlyList<double> xAxis,
IReadOnlyList<double> yAxis,
IReadOnlyList<double> zAxis,
IReadOnlyList<double> values,
GridBoundaryCondition boundaryCondition = default,
ExtrapolationMode extrapolation = ExtrapolationMode.Throw
)Parameters
- xAxis IReadOnlyList<Double>
- The x-coordinates of the grid points.
- yAxis IReadOnlyList<Double>
- The y-coordinates of the grid points.
- zAxis IReadOnlyList<Double>
- The z-coordinates of the grid points.
- values IReadOnlyList<Double>
- The grid values in flat, row-major storage.
- boundaryCondition GridBoundaryCondition (Optional)
- The boundary condition for out-of-range samples during construction.
- extrapolation ExtrapolationMode (Optional)
- The extrapolation mode for out-of-range coordinates.
Return Value
TensorSplineGridSurfaceA TensorSplineGridSurface that performs 3D tensor-product cubic Hermite interpolation.
Exceptions
| Argument | xAxis, yAxis, zAxis, or values is null. |
| Argument | The values length does not match the product of axis lengths, or an axis has fewer than 2 points. |
GridCubicTensorSplineInterpolator(IReadOnlyList<Double>, IReadOnlyList<Double>, IReadOnlyList<Double>, Double[,], GridBoundaryCondition, ExtrapolationMode)
public static TensorSplineGridSurface GridCubicTensorSplineInterpolator(
IReadOnlyList<double> xAxis,
IReadOnlyList<double> yAxis,
IReadOnlyList<double> zAxis,
double[,,] values,
GridBoundaryCondition boundaryCondition = default,
ExtrapolationMode extrapolation = ExtrapolationMode.Throw
)Parameters
- xAxis IReadOnlyList<Double>
- The x-coordinates of the grid points.
- yAxis IReadOnlyList<Double>
- The y-coordinates of the grid points.
- zAxis IReadOnlyList<Double>
- The z-coordinates of the grid points.
- values Double[3]
- The grid values as a 3D array.
- boundaryCondition GridBoundaryCondition (Optional)
- The boundary condition for out-of-range samples during construction.
- extrapolation ExtrapolationMode (Optional)
- The extrapolation mode for out-of-range coordinates.
Return Value
TensorSplineGridSurfaceA TensorSplineGridSurface that performs 3D tensor-product cubic Hermite interpolation.
Remarks
Array dimension order
For the values array, the dimension order follows the order of the axis arguments.
The array must satisfy:
- values.GetLength(0) == xAxis.Count
- values.GetLength(1) == yAxis.Count
- values.GetLength(2) == zAxis.Count
and values[i, j, k] = f(xAxis[i], yAxis[j], zAxis[k]).
Exceptions
| Argument | xAxis, yAxis, zAxis, or values is null. |
| Argument | Array dimensions do not match axis lengths, or an axis has fewer than 2 points. |