Interpolation.MonotoneCubicSpline Method

Creates a monotone cubic spline curve from the specified data points.

Definition

Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.0.0
C#
public static CubicSpline MonotoneCubicSpline(
	double[] xValues,
	double[] yValues
)

Parameters

xValues  Double[]
The x-coordinates of the data points. Must be strictly increasing.
yValues  Double[]
The y-coordinates of the data points.

Return Value

CubicSpline
A CubicSpline object that interpolates the data while preserving monotonicity.

Remarks

This method creates a cubic spline that preserves the monotonicity of the input data. If the data is monotone increasing (or decreasing), the interpolated curve will also be monotone increasing (or decreasing). The curve can be reused for efficient repeated evaluation and supports resampling, differentiation, and integration.

Exceptions

ArgumentNullExceptionxValues or yValues is null.
DimensionMismatchException The lengths of xValues and yValues do not match.

See Also