Evaluates the second derivatives of the cubic spline interpolation polynomial at the given functions tabulation points when the first derivative at the boundary (equivalently the end points) is known.
functionValuesAtTabulationPoints[i] = f(tabulationPointsInX[i])
.functionValuesAtTabulationPoints[i] = f(tabulationPointsInX[i])
.tabulationPointsInX[0]
.tabulatedPointInX[n-1]
.An array of doubles which are equal to the 2nd derivatives of the interpolation function at the interpolation points.
Description of the parameters
Given arrays tabulationPointsInX[0..n-1]
and
tabulationPointsInY[0..n-1]
containing a tabulated function,
i.e. tabulationPointsInY[i] = f(tabulationPointsInY[i])
, with
tabulationPointsInX[0] < tabulationPointsInX[1] < ... < tabulationPointsInX[n-1]
,
and given values derivativeInterpolationAt0
and derivativeInterpolationAtn_1
for the first derivative of the interpolating function at the points tabulationPointsInX[0]
and tabulationPointsInX[n-1]
, respectively. This method returns an array
of length n
, that contains the second derivatives of the interpolation
function at the tabulation points tabulationPointsInX[i]
. If
derivativeInterpolationAt0
and/or derivativeInterpolationAtn_1
are equal to 1030 or larger, then the method sets
the second derivative at the boundary to be zero.
Remark: If the two arrays have different lengths, the shorter one will be used as reference. The two arrays should be at least 2 elements long.
Exception Type | Condition |
---|---|
InterpolationException | Thrown when the input values do not meet the requirements mentioned above. |
Interpolation Class | WebCab.Libraries.Finance.Portfolio Namespace