| SmoothCubicSpline(DoubleVector, DoubleVector, Double, DoubleVector) Constructor |
Constructs a smooth cubic spline object for interpolation within the
given data points.
Namespace: CenterSpace.NMath.CoreAssembly: NMath (in NMath.dll) Version: 7.4
Syntax public SmoothCubicSpline(
DoubleVector x,
DoubleVector y,
double p,
DoubleVector dy = null
)
Public Sub New (
x As DoubleVector,
y As DoubleVector,
p As Double,
Optional dy As DoubleVector = Nothing
)
public:
SmoothCubicSpline(
DoubleVector^ x,
DoubleVector^ y,
double p,
DoubleVector^ dy = nullptr
)
new :
x : DoubleVector *
y : DoubleVector *
p : float *
?dy : DoubleVector
(* Defaults:
let _dy = defaultArg dy null
*)
-> SmoothCubicSpline
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 Exception | Condition |
---|
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