WebCab Functions Web Services for .NET v2.0

Interpolation.CubicSplinePointwisePreEvaluation Method 

Evaluates the cubic spline interpolation of a function at a point when the 2nd differentials at the tabulation points are known.

public double CubicSplinePointwisePreEvaluation(
   double[] tabulationPointsInX,
   double[] functionValuesAtTabulationPoints,
   double[] secondDifferential,
   double interpolationPoint
);

Parameters

tabulationPointsInX
The array containing the values at which the function is tabulated, i.e. functionValuesAtTabulationPoints[i] = f(tabulationPointsInX[i]).
functionValuesAtTabulationPoints
An array of doubles of the values of the function evaluated at the interpolation points, i.e. functionValuesAtTabulationPoints[i] = f(tabulationPointsInX[i]).
secondDifferential
This is an array containing the 2nd differential of the cubic spline which have been pre-calculated by the method cubicSpline2ndDifferential.
interpolationPoint
The point at which the interpolation function is evaluated and returned. Note that this is the point at which we wished to find the value of the given function which we only knew at the tabulation points.

Return Value

The value of the cubic spline interpolation function at a given point.

Remarks

The 2nd differentials can be evaluated using the method CubicSpline2ndDifferential.

Details

Given the arrays tabulationPointsInX[0..n-1] and functionValuesAtTabulationPoints[0..n-1], which tabulate a function where the tabulationPointsInX is an array where the elements are monotonically increasing. Moreover, given the array secondDifferential[0..n-1], which is the output of the method CubicSpline2ndDifferential, and given a value of the interpolation points interpolationPoint, this method returns the value of the function at interpolationPoint according to the cubic-spline interpolation method.

Remarks of this methods application

Exceptions

Exception TypeCondition
InterpolationExceptionThrown when the input values do not meet the requirements mentioned above.

See Also

Interpolation Class | Interpolation Namespace | CubicSplinePointwise | CubicSpline2ndDifferential