Click or drag to resize

SmoothCubicSpline(DoubleVector, DoubleVector, Double, DoubleVector) Constructor

Constructs a smooth cubic spline object for interpolation within the given data points.

Namespace: CenterSpace.NMath.Core
Assembly: NMath (in NMath.dll) Version: 7.4
Syntax
public SmoothCubicSpline(
	DoubleVector x,
	DoubleVector y,
	double p,
	DoubleVector dy = null
)

Parameters

x  DoubleVector
Vector of independent x variable values.
y  DoubleVector
Vector of dependent y variable values.
p  Double
Smoothness factor. p must lie in the closed interval [0, 1]. A value of zero corresponds to maximum smoothness and the result is linear interpolation (zero curvature). A value of 1 corresponds to minimum smoothness and the result is a traditional cubic spline interpolation.
dy  DoubleVector  (Optional)
Variance in the dependent y variables. Default is 1 for each y value.
Exceptions
ExceptionCondition
InvalidArgumentException Thrown if: The number of input data points is less than 1. The number of independent x values is not equal to the number of dependent y values. The smoothing factor p is less than zero or greater than one. If y values variance dy is specified and its length is not equal to y's length.
See Also