Cubic Grid Surface 3D Class
Definition
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.1.0
public sealed class CubicGridSurface3D : GridSurface- Inheritance
- Object → Surface → GridSurface → CubicGridSurface3D
Remarks
This class provides a specialized, high-performance implementation of 3D cubic interpolation on rectilinear grids. It precomputes all partial derivatives (∂f/∂x, ∂f/∂y, ∂f/∂z, ∂²f/∂x∂y, ∂²f/∂x∂z, ∂²f/∂y∂z, ∂³f/∂x∂y∂z) at all grid nodes using natural cubic splines (CubicSpline) along each axis, then evaluates tricubic Hermite patches in O(1) time per query.
Spline type: This surface uses Natural cubic splines along each axis, which enforce zero second derivative at the boundaries. The resulting surface has C² continuity in the interior and smooth (but extrapolated) behavior near edges.
Difference from tensor-product splines: Unlike TensorSplineGridSurface, which applies 1D kernels recursively and supports arbitrary boundary conditions and kernels, this class is limited to 3D, uses only natural cubic splines, and does not support custom boundary conditions. However, it offers better performance by precomputing all derivatives once during construction.
Performance: All evaluation methods (value, gradient, Hessian) perform zero heap allocations. Construction is O(N) where N is the total number of grid points, though the memory footprint is higher than 2D due to storing seven derivative arrays in addition to the function values.
Creation: Create instances using CreateCubic(IReadOnlyList<IReadOnlyList<Double>>, IReadOnlyList<Double>, ExtrapolationMode) for 3D grids. For custom boundary conditions or N-dimensional grids, use CreateCubicTensorSpline(IReadOnlyList<IReadOnlyList<Double>>, IReadOnlyList<Double>, GridBoundaryCondition, ExtrapolationMode) or CreateTensorSpline(IReadOnlyList<IReadOnlyList<Double>>, IReadOnlyList<Double>, ISplineKernel1D, GridBoundaryCondition, ExtrapolationMode) instead.
Properties
| Dimension |
Gets the number of dimensions of the input space.
(Inherited from Surface) |
| Values |
Gets a read-only span containing the values of at the data points.
(Inherited from GridSurface) |
Methods
| Equals | Determines whether the specified object is equal to the current object. (Inherited from Object) |
| Evaluate(Double[]) |
Evaluates the surface at the specified point.
(Inherited from Surface) |
| Evaluate( |
Evaluates the surface at the specified point.
(Inherited from Surface) |
| Evaluate( |
Evaluates the surface at the specified point.
(Inherited from GridSurface) |
| Evaluate( |
Evaluates the surface at multiple points specified by a list of vectors.
(Inherited from Surface) |
| Evaluate( |
Evaluates the surface at the specified point.
(Inherited from GridSurface) |
| Evaluate( |
Evaluates the surface at multiple points specified by a read-only span of vectors.
(Inherited from Surface) |
| Evaluate( |
Evaluates the surface at multiple points stored in column-major layout.
(Inherited from Surface) |
| Evaluate | Evaluates the Hessian matrix at the specified point. |
| Get | Serves as the default hash function. (Inherited from Object) |
| Get | Gets the Type of the current instance. (Inherited from Object) |
| Gradient( |
Computes the gradient of the surface at the specified point.
(Inherited from Surface) |
| Gradient( |
Computes the gradient of a 2D surface at the specified point.
(Inherited from Surface) |
| Gradient( |
Computes the gradient of the scalar field at the specified point.
(Inherited from GridSurface) |
| Gradient( |
Computes the gradient of the surface at the specified point.
(Inherited from Surface) |
| Gradient( | (Inherited from GridSurface) |
| Gradients( |
Computes the gradients of the surface at multiple points.
(Inherited from Surface) |
| Gradients( |
Computes the gradients of the surface at multiple points.
(Inherited from Surface) |
| Hessian |
Computes the Hessian matrix of the surface at the specified point.
(Inherited from Surface) |
| ToString | Returns a string that represents the current object. (Inherited from Object) |