WebCab Functions Web Services for .NET v2.0

Interpolation.BicubicSplinePointwiseEvaluationPreEvaluation Method 

Evaluates the value of the bicubic interpolation function at a given point.

public double BicubicSplinePointwiseEvaluationPreEvaluation(
   double[] tabulationPointsInFirstVariable,
   double[] tabulationPointsInSecondVariable,
   double[][] function,
   double[][] secondDerivativeFunction,
   double interpolationPointFirstCoordinate,
   double interpolationPointSecondCoordinate
);

Parameters

tabulationPointsInFirstVariable
An array of doubles which are the values in the first variable at which the function is tabulated.
tabulationPointsInSecondVariable
An array of 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 a-th tabulated point in the first variable and the b-th tabulated point in the second variable.
secondDerivativeFunction
A matrix (or double[][]) which is returned by the method interpolationFunction2ndDerivative when the same function and tabulation points are used.
interpolationPointFirstCoordinate
A double which is the value in the first variable of the point at which the interpolation functions value is returned.
interpolationPointSecondCoordinate
A double which is the value in the second variable of the point at which the interpolation functions value is returned.

Return Value

The value of the bicubic interpolation function at a given point.

Remarks

This method is identical in approach to BicubicSplinePointwiseEvaluation except that here the evaluation of the 2nd derivatives of a series of interpolation function is pre-evaluated using InterpolationFunction2ndDerivative. When only one point of the bicubic interpolation function is sort then this method in conjunction with InterpolationFunction2ndDerivative is equivalent to the application of BicubicSplinePointwiseEvaluation. However when two or more points are sort then this approach is preferable from a performance point of view since you will only need to evaluate 2nd derivative once rather than two or more times.

Rational of this method

This method is designed to be used in conjunction with the method InterpolationFunction2ndDerivative which evaluates the 2nd derivatives of a series of splines interpolated along the grid points in the direction of the 2nd variable. By pre-evaluating the values of the 2nd derivatives we are able to apply this method much more efficiently than they alternative approach based on BicubicSplinePointwiseEvaluation. This approach will be particularly appropriate in instances where the value of the bicubic spline is required at a large number of points. The reason for this is that the alternative approach based on BicubicSplinePointwiseEvaluation will require for each point on the bicubic function evaluation all the 2nd differentials along the 2nd grid coordinate to the re-evaluated. Whereas an approach based on this method will only require one evaluation of the 2nd derivative irrespective of the number of times the bicubic interpolation function is evaluated.

Parameter Indexing

It is essential that the indexing of the parameters used within this method correspond to the input parameters used to pre-calculate the 2nd derivatives in the method InterpolationFunction2ndDerivative. The reason for this is that the parameter secondDerivativeFunction should be evaluated using InterpolationFunction2ndDerivative.

Restrictions on the parameters

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 | Interpolation Namespace | Evaluates the 2nd Derivatives which are required as a parameter.