GridSurface.CreateCubic Method

Creates a specialized cubic spline grid surface for 2D or 3D interpolation.

Definition

Namespace: Numerics.NET.Curves.Surfaces
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.1.0
C#
public static GridSurface CreateCubic(
	IReadOnlyList<IReadOnlyList<double>> axes,
	IReadOnlyList<double> values,
	ExtrapolationMode extrapolation = ExtrapolationMode.Throw
)

Parameters

axes  IReadOnlyList<IReadOnlyList<Double>>
The coordinate vectors for each dimension. Must have length 2 or 3.
values  IReadOnlyList<Double>
The grid values in row-major order.
extrapolation  ExtrapolationMode  (Optional)
The extrapolation mode for out-of-range coordinates.

Return Value

GridSurface
A grid surface using specialized 2D or 3D cubic spline interpolation.

Remarks

This method creates specialized cubic surfaces for 2D and 3D grids that are based on CubicSpline with natural cubic spline boundary conditions. These surfaces precompute partial derivatives at grid nodes for efficient evaluation.

For N-dimensional grids (including 2D/3D with different boundary conditions or custom kernels), use CreateCubicTensorSpline(IReadOnlyList<IReadOnlyList<Double>>, IReadOnlyList<Double>, GridBoundaryCondition, ExtrapolationMode) or CreateTensorSpline(IReadOnlyList<IReadOnlyList<Double>>, IReadOnlyList<Double>, ISplineKernel1D, GridBoundaryCondition, ExtrapolationMode) instead.

Boundary behavior: The specialized 2D/3D cubic surfaces use natural cubic splines along each axis, which enforce zero second derivative at the boundaries. This is equivalent to Natural.

Exceptions

NotSupportedExceptionThrown when the number of axes is not 2 or 3.

See Also