Hermite cubic splines are defined by the function values and their slopes (first derivatives). If the slopws are unknown, they must be estimated.
Type | Description |
Function or value | Description |
Full Usage:
interpolate xData yData
Parameters:
Vector<float>
-
Note: Must not contain duplicate x values (use Approximation.regularizeValues to preprocess data!)
yData : Vector<float>
-
function value at x values
Returns: HermiteCoef
Coefficients that define the interpolating function.
|
Second derivative (curvature) is NOT necessarily continuous at knots to allow higher flexibility to reduce oscillations!
Example
|
Full Usage:
interpolatePreserveMonotonicity xData yData
Parameters: Returns: HermiteCoef
Coefficients that define the interpolating function.
|
Computes coefficients for piecewise interpolating splines. If the knots are monotone in/decreasing, the spline also is monotone (CJC Kruger method) The x data has to be sorted ascending Second derivative (curvature) is NOT necessarily continuous at knots to allow higher flexibility to reduce oscillations!Constrained Cubic Spline Interpolation for Chemical Engineering Applications by CJC Kruger
Example
|
Full Usage:
interpolateSorted xData yData
Parameters:
Vector<float>
-
Note: Must not contain duplicate x values (use Approximation.regularizeValues to preprocess data!)
yData : Vector<float>
-
function value at x values
Returns: HermiteCoef
Coefficients that define the interpolating function.
|
Second derivative (curvature) is NOT necessarily continuous at knots to allow higher flexibility to reduce oscillations!
Example
|
Full Usage:
interpolateWithSlopes xData yData slopes
Parameters:
Vector<float>
-
Note: Must not contain duplicate x values (use Approximation.regularizeValues to preprocess data!)
yData : Vector<float>
-
function value at x values
slopes : Vector<float>
-
slopes at x values
Returns: HermiteCoef
Coefficients that define the interpolating function.
|
Second derivative (curvature) is NOT necessarily continuous at knots to allow higher flexibility to reduce oscillations!
|
Full Usage:
predict coef x
Parameters:
HermiteCoef
x : float
-
X value of which the y value should be predicted.
Returns: float
Function that takes an x value and returns function value.
|
x values outside of the xValue range are predicted by straight lines defined by the nearest knot!
Example
|