Interpolation.Scattered Nearest Interpolator Method
Definition
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.1.0
Overload List
| Scattered | Creates a nearest-neighbor interpolator for scattered N-dimensional data. |
| Scattered | Creates a nearest-neighbor interpolator for scattered N-dimensional data. |
| Scattered | Creates a nearest-neighbor interpolator for scattered N-dimensional data. |
| Scattered | Creates a nearest-neighbor interpolator for scattered 2D data using array inputs. |
| Scattered | Creates a nearest-neighbor interpolator for scattered 2D data. |
| Scattered | Creates a nearest-neighbor interpolator for scattered 3D data using array inputs. |
| Scattered | Creates a nearest-neighbor interpolator for scattered 3D data. |
ScatteredNearestInterpolator(Double[,], Double[])
public static NearestScatterSurface ScatteredNearestInterpolator(
double[,] points,
double[] values
)Parameters
- points Double[2]
- A 2D array where each row represents a sample point. Shape: (nPoints, dimension).
- values Double[]
- An array of function values at each sample point. Length: nPoints.
Return Value
NearestScatterSurfaceA NearestScatterSurface that interpolates the scattered data using nearest-neighbor.
Remarks
This method creates a surface that returns the value of the nearest sample point for any query. It works in any number of dimensions N ≥ 1.
Exceptions
| Argument | points or values is null. |
| Argument | The number of rows in points does not match the length of values, or points has fewer than 1 column. |
ScatteredNearestInterpolator(IReadOnlyList<Vector<Double>>, Vector<Double>)
public static NearestScatterSurface ScatteredNearestInterpolator(
IReadOnlyList<Vector<double>> points,
Vector<double> values
)Parameters
- points IReadOnlyList<Vector<Double>>
- A collection of vectors, where each vector represents a sample point in ℝⁿ.
- values Vector<Double>
- A vector of function values at each sample point. Length must match the number of points.
Return Value
NearestScatterSurfaceA NearestScatterSurface that interpolates the scattered data using nearest-neighbor.
Remarks
This method creates a surface that returns the value of the nearest sample point for any query. All points in points must have the same dimension.
Exceptions
| Argument | points or values is null. |
| Argument | The number of points does not match the length of values, all points do not have the same dimension, or the dimension is less than 1. |
ScatteredNearestInterpolator(Matrix<Double>, Vector<Double>)
public static NearestScatterSurface ScatteredNearestInterpolator(
Matrix<double> points,
Vector<double> values
)Parameters
- points Matrix<Double>
- A matrix where each row represents a sample point. Shape: (nPoints, dimension).
- values Vector<Double>
- A vector of function values at each sample point. Length: nPoints.
Return Value
NearestScatterSurfaceA NearestScatterSurface that interpolates the scattered data using nearest-neighbor.
Remarks
This method creates a surface that returns the value of the nearest sample point for any query. It works in any number of dimensions N ≥ 1.
Exceptions
| Argument | points or values is null. |
| Argument | The number of rows in points does not match the length of values, or points has fewer than 1 column. |
ScatteredNearestInterpolator(Double[], Double[], Double[])
public static NearestScatterSurface ScatteredNearestInterpolator(
double[] x,
double[] y,
double[] values
)Parameters
- x Double[]
- The x-coordinates of the scattered points.
- y Double[]
- The y-coordinates of the scattered points.
- values Double[]
- The function values at each scattered point.
Return Value
NearestScatterSurfaceA NearestScatterSurface that performs 2D scattered nearest-neighbor interpolation.
Exceptions
| Argument | x, y, or values is null. |
| Argument | The lengths of x, y, and values do not match. |
ScatteredNearestInterpolator(Vector<Double>, Vector<Double>, Vector<Double>)
public static NearestScatterSurface ScatteredNearestInterpolator(
Vector<double> x,
Vector<double> y,
Vector<double> values
)Parameters
- x Vector<Double>
- The x-coordinates of the scattered points.
- y Vector<Double>
- The y-coordinates of the scattered points.
- values Vector<Double>
- The function values at each scattered point.
Return Value
NearestScatterSurfaceA NearestScatterSurface that performs 2D scattered nearest-neighbor interpolation.
Remarks
This method returns the value of the nearest sample point for any query. This method is optimized for 2D data.
Exceptions
| Argument | x, y, or values is null. |
| Argument | The lengths of x, y, and values do not match. |
ScatteredNearestInterpolator(Double[], Double[], Double[], Double[])
public static NearestScatterSurface ScatteredNearestInterpolator(
double[] x,
double[] y,
double[] z,
double[] values
)Parameters
- x Double[]
- The x-coordinates of the scattered points.
- y Double[]
- The y-coordinates of the scattered points.
- z Double[]
- The z-coordinates of the scattered points.
- values Double[]
- The function values at each scattered point.
Return Value
NearestScatterSurfaceA NearestScatterSurface that performs 3D scattered nearest-neighbor interpolation.
Exceptions
| Argument | x, y, z, or values is null. |
| Argument | The lengths of x, y, z, and values do not match. |
ScatteredNearestInterpolator(Vector<Double>, Vector<Double>, Vector<Double>, Vector<Double>)
public static NearestScatterSurface ScatteredNearestInterpolator(
Vector<double> x,
Vector<double> y,
Vector<double> z,
Vector<double> values
)Parameters
- x Vector<Double>
- The x-coordinates of the scattered points.
- y Vector<Double>
- The y-coordinates of the scattered points.
- z Vector<Double>
- The z-coordinates of the scattered points.
- values Vector<Double>
- The function values at each scattered point.
Return Value
NearestScatterSurfaceA NearestScatterSurface that performs 3D scattered nearest-neighbor interpolation.
Remarks
This method returns the value of the nearest sample point for any query. This method is optimized for 3D data.
Exceptions
| Argument | x, y, z, or values is null. |
| Argument | The lengths of x, y, z, and values do not match. |