RbfSurface Class

Represents an N-dimensional scattered data interpolant using radial basis functions (RBF).

Definition

Namespace: Numerics.NET.Curves.Surfaces
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.1.0
C#
public sealed class RbfSurface : Surface
Inheritance
Object  →  Surface  →  RbfSurface

Remarks

The RbfSurface class implements radial basis function interpolation for scattered data in arbitrary dimensions. RBF methods construct a smooth global interpolant as a weighted sum of radial basis functions centered at each data point.

The interpolant has the form:

For strictly positive definite (PD) kernels:

s(x) = Σᵢ wᵢ φ(||x - pᵢ||)

For conditionally positive definite (CPD) kernels:

s(x) = Σᵢ wᵢ φ(||x - pᵢ||) + p(x)

where φ is the radial basis function kernel, pᵢ are the data point locations, wᵢ are the interpolation weights, and p(x) is an augmenting polynomial.

Kernel types:

  • PD kernels (Gaussian, Multiquadric, InverseMultiquadric, InverseQuadratic): Do not require polynomial augmentation and produce unconditionally solvable systems.
  • CPD kernels (ThinPlate, Linear, Cubic, Quintic): Require an affine polynomial tail p(x) = c₀ + c₁x₁ + ... + cₐxₐ to ensure well-posedness and exact reproduction of linear functions.

Construction and evaluation:

  • Given N sample points pᵢ ∈ ℝᴰ with values fᵢ, weights and polynomial coefficients are computed by solving a dense linear system.
  • Construction cost is O(N³) due to the dense linear solve.
  • Evaluation cost is O(N) per query point.
  • The interpolant is defined everywhere in ℝⁿ and smoothly extrapolates beyond the data points.

RBF interpolation produces smooth, infinitely differentiable surfaces (for smooth kernels) and is particularly effective for scattered data in multiple dimensions. However, it becomes computationally expensive for large datasets due to the cubic construction cost.

The RbfSurface class inherits from Surface and provides both evaluation and gradient computation. Create instances using the ScatteredRbfInterpolator factory methods, which accept various input formats including vectors, arrays, and matrices.

RBF options such as kernel type, shape parameter, and regularization can be specified using the RbfOptions class.

Properties

Dimension Gets the number of dimensions of the input space.
(Inherited from Surface)

Methods

EqualsDetermines 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(IReadOnlyList<Double>) Evaluates the surface at the specified point.
(Inherited from Surface)
Evaluate(ReadOnlySpan<Double>) Evaluates the surface at the specified point.
(Overrides Surface.Evaluate(ReadOnlySpan<Double>))
Evaluate(IReadOnlyList<Vector<Double>>, Span<Double>) Evaluates the surface at multiple points specified by a list of vectors.
(Inherited from Surface)
Evaluate(ReadOnlySpan<Vector<Double>>, Span<Double>) Evaluates the surface at multiple points specified by a read-only span of vectors.
(Inherited from Surface)
Evaluate(Int32, ReadOnlySpan2D<Double>, Span<Double>) Evaluates the surface at multiple points stored in column-major layout.
(Inherited from Surface)
GetHashCodeServes as the default hash function.
(Inherited from Object)
GetTypeGets the Type of the current instance.
(Inherited from Object)
Gradient(Vector<Double>) Computes the gradient of the surface at the specified point.
(Inherited from Surface)
Gradient(Double, Double) Computes the gradient of a 2D surface at the specified point.
(Inherited from Surface)
Gradient(ReadOnlySpan<Double>, Span<Double>) Computes the gradient of the surface at the specified point.
(Overrides Surface.Gradient(ReadOnlySpan<Double>, Span<Double>))
Gradient(Vector<Double>, Vector<Double>) Computes the gradient of the surface at the specified point.
(Inherited from Surface)
Gradients(Matrix<Double>) Computes the gradients of the surface at multiple points.
(Inherited from Surface)
Gradients(Matrix<Double>, Matrix<Double>) 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)
ToStringReturns a string that represents the current object.
(Inherited from Object)

See Also