Interpolation.ScatteredNearestInterpolator Method

Definition

Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.1.0

Overload List

ScatteredNearestInterpolator(Double[,], Double[]) Creates a nearest-neighbor interpolator for scattered N-dimensional data.
ScatteredNearestInterpolator(IReadOnlyList<Vector<Double>>, Vector<Double>) Creates a nearest-neighbor interpolator for scattered N-dimensional data.
ScatteredNearestInterpolator(Matrix<Double>, Vector<Double>) Creates a nearest-neighbor interpolator for scattered N-dimensional data.
ScatteredNearestInterpolator(Double[], Double[], Double[]) Creates a nearest-neighbor interpolator for scattered 2D data using array inputs.
ScatteredNearestInterpolator(Vector<Double>, Vector<Double>, Vector<Double>) Creates a nearest-neighbor interpolator for scattered 2D data.
ScatteredNearestInterpolator(Double[], Double[], Double[], Double[]) Creates a nearest-neighbor interpolator for scattered 3D data using array inputs.
ScatteredNearestInterpolator(Vector<Double>, Vector<Double>, Vector<Double>, Vector<Double>) Creates a nearest-neighbor interpolator for scattered 3D data.

ScatteredNearestInterpolator(Double[,], Double[])

Creates a nearest-neighbor interpolator for scattered N-dimensional data.
C#
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

NearestScatterSurface
A 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

ArgumentNullExceptionpoints or values is null.
ArgumentException 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>)

Creates a nearest-neighbor interpolator for scattered N-dimensional data.
C#
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

NearestScatterSurface
A 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

ArgumentNullExceptionpoints or values is null.
ArgumentException 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>)

Creates a nearest-neighbor interpolator for scattered N-dimensional data.
C#
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

NearestScatterSurface
A 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

ArgumentNullExceptionpoints or values is null.
ArgumentException The number of rows in points does not match the length of values, or points has fewer than 1 column.

ScatteredNearestInterpolator(Double[], Double[], Double[])

Creates a nearest-neighbor interpolator for scattered 2D data using array inputs.
C#
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

NearestScatterSurface
A NearestScatterSurface that performs 2D scattered nearest-neighbor interpolation.

Exceptions

ArgumentNullExceptionx, y, or values is null.
ArgumentException The lengths of x, y, and values do not match.

ScatteredNearestInterpolator(Vector<Double>, Vector<Double>, Vector<Double>)

Creates a nearest-neighbor interpolator for scattered 2D data.
C#
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

NearestScatterSurface
A 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

ArgumentNullExceptionx, y, or values is null.
ArgumentException The lengths of x, y, and values do not match.

ScatteredNearestInterpolator(Double[], Double[], Double[], Double[])

Creates a nearest-neighbor interpolator for scattered 3D data using array inputs.
C#
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

NearestScatterSurface
A NearestScatterSurface that performs 3D scattered nearest-neighbor interpolation.

Exceptions

ArgumentNullExceptionx, y, z, or values is null.
ArgumentException The lengths of x, y, z, and values do not match.

ScatteredNearestInterpolator(Vector<Double>, Vector<Double>, Vector<Double>, Vector<Double>)

Creates a nearest-neighbor interpolator for scattered 3D data.
C#
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

NearestScatterSurface
A 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

ArgumentNullExceptionx, y, z, or values is null.
ArgumentException The lengths of x, y, z, and values do not match.

See Also