Interpolation Tensor Extensions.Grid Linear Interpolator Method
Definition
Namespace: Numerics.NET
Assembly: Numerics.NET.Tensors (in Numerics.NET.Tensors.dll) Version: 10.1.0
Assembly: Numerics.NET.Tensors (in Numerics.NET.Tensors.dll) Version: 10.1.0
Overload List
| Grid | Creates a grid-based linear interpolator over an N-dimensional rectilinear grid. |
| Grid | Creates a grid-based linear interpolator over a 3D rectilinear grid. |
GridLinearInterpolator(IReadOnlyList<IReadOnlyList<Double>>, Tensor<Double>, GridBoundaryCondition, ExtrapolationMode)
Creates a grid-based linear interpolator over an N-dimensional rectilinear grid.
public static GridSurface GridLinearInterpolator(
IReadOnlyList<IReadOnlyList<double>> axes,
Tensor<double> values,
GridBoundaryCondition boundaryCondition = default,
ExtrapolationMode extrapolation = ExtrapolationMode.Throw
)Parameters
- axes IReadOnlyList<IReadOnlyList<Double>>
- The coordinate vectors for each dimension.
- values Tensor<Double>
- The grid values in flat, row-major storage.
- boundaryCondition GridBoundaryCondition (Optional)
- extrapolation ExtrapolationMode (Optional)
- The extrapolation mode for out-of-range coordinates.
Return Value
GridSurfaceA LinearGridSurface that performs multilinear grid interpolation.
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. |
GridLinearInterpolator(IReadOnlyList<Double>, IReadOnlyList<Double>, IReadOnlyList<Double>, Tensor<Double>, ExtrapolationMode)
Creates a grid-based linear interpolator over a 3D rectilinear grid.
public static GridSurface GridLinearInterpolator(
IReadOnlyList<double> xAxis,
IReadOnlyList<double> yAxis,
IReadOnlyList<double> zAxis,
Tensor<double> values,
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 Tensor<Double>
- The grid values in flat, row-major storage.
- extrapolation ExtrapolationMode (Optional)
- The extrapolation mode for out-of-range coordinates.
Return Value
GridSurfaceA LinearGridSurface that performs 3D trilinear 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. |