Top Description Constructors Methods
org.apache.commons.math3.analysis.interpolation

public Class BicubicInterpolator

extends Object
implements BivariateGridInterpolator
Class Inheritance
All Implemented Interfaces
org.apache.commons.math3.analysis.interpolation.BivariateGridInterpolator
Imports
org.apache.commons.math3.exception.DimensionMismatchException, .NoDataException, .NonMonotonicSequenceException, .NumberIsTooSmallException, org.apache.commons.math3.util.MathArrays

Generates a bicubic interpolating function.

Caveat

Because the interpolation scheme requires that derivatives be specified at the sample points, those are approximated with finite differences (using the 2-points symmetric formulae). Since their values are undefined at the borders of the provided interpolation ranges, the interpolated values will be wrong at the edges of the patch. The interpolate method will return a function that overrides BicubicInterpolatingFunction#isValidPoint(double, double) to indicate points where the interpolation will be inaccurate.

Since
3.4

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public BicubicInterpolatingFunction
interpolate(final double[]
All the x-coordinates of the interpolation points, sorted in increasing order.
xval
,
final double[]
All the y-coordinates of the interpolation points, sorted in increasing order.
yval
,
final double[][]
The values of the interpolation points on all the grid knots: fval[i][j] = f(xval[i], yval[j]).
fval
)

Implements org.apache.commons.math3.analysis.interpolation.BivariateGridInterpolator.interpolate.

Compute an interpolating function for the dataset.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

BicubicInterpolatorback to summary
public BicubicInterpolator()

Method Detail

interpolateback to summary
public BicubicInterpolatingFunction interpolate(final double[] xval, final double[] yval, final double[][] fval) throws NoDataException, DimensionMismatchException, NonMonotonicSequenceException, NumberIsTooSmallException

Implements org.apache.commons.math3.analysis.interpolation.BivariateGridInterpolator.interpolate.

Doc from org.apache.commons.math3.analysis.interpolation.BivariateGridInterpolator.interpolate.

Compute an interpolating function for the dataset.

Parameters
xval:double[]

All the x-coordinates of the interpolation points, sorted in increasing order.

yval:double[]

All the y-coordinates of the interpolation points, sorted in increasing order.

fval:double[][]

The values of the interpolation points on all the grid knots: fval[i][j] = f(xval[i], yval[j]).

Returns:BicubicInterpolatingFunction

a function which interpolates the dataset.

Exceptions
NoDataException:
if any of the arrays has zero length.
DimensionMismatchException:
if the array lengths are inconsistent.
NonMonotonicSequenceException:
if the array is not sorted.
NumberIsTooSmallException:
if the number of points is too small for the order of the interpolation