WebCab Functions for .NET v2.0

Interpolation.InterpolationFunction2ndDerivative Method 

Evaluates the 2nd derivatives in the direction of the 2nd coordinate of the grid over which the function of two variables is tabulated.

public double[][] InterpolationFunction2ndDerivative(
   double[] tabulationPointsInSecondVariable,
   double[][] function
);

Parameters

tabulationPointsInSecondVariable
An array of n doubles which are the values in the second variable at which the function is tabulated.
function
An m by n matrix of double (or double[][]) representing the function in two variables which we to interpolate. This matrix (or double[][]) represents a function by the (a,b)th entry being the value of the function at the ath tabulated point in the first variable and the bth tabulated point in the second variable.

Remarks

This method is an auxiliary result which should be used in conjunction with the BicubicSplinePointwiseEvaluationPreEvaluation, in evaluating the bicubic spline at a given point.

Rationale of this method

The purpose of this method is to allow pre-calculation of the values of the 2nd derivatives of a series of splines interpolated along the grid points in the direction of the 2nd variable. The reason for this is that the application of BicubicSplinePointwiseEvaluationPreEvaluation in the evaluated of the bicubic spline of a surface can be applied much more efficiently in instances when the bicubic interpolation functions value is required at a large number of points. In such instances by pre-evaluating the 2nd differentials in the direction of the 2nd grid coordinate that application of BicubicSplinePointwiseEvaluationPreEvaluation, will be significantly more efficient than repeated application of the alternative BicubicSplinePointwiseEvaluation which will need to evaluate the 2nd differentials along the 2nd grid coordinate for each point at which the bicubic spline is evaluated.

Application of this method

Given an m by n tabulated function of two variables function[0..m-1][0..n-1], which is tabulated on a grid spanned by two arrays which represent the values in the first and second variables in which the function is tabulated. This method constructs one-dimensional natural cubic splines of the rows (in the matrix) of the representation of the function and returns the second order derivatives of the cubic spline representation of the function.

Note: The tabulation points of the first variable are not required by this method.

The following restrictions apply to the input parameters:

Exceptions

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

See Also

Interpolation Class | WebCab.Libraries.Math.Interpolation Namespace | uses the 2nd differentials evaluated using this method with the evaluation of the bicubic interpolation function of a surface.