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

public Class BicubicSplineInterpolator

extends Object
implements BivariateGridInterpolator
Class Inheritance
All Implemented Interfaces
org.apache.commons.math3.analysis.interpolation.BivariateGridInterpolator
Known Direct Subclasses
org.apache.commons.math3.analysis.interpolation.SmoothingPolynomialBicubicSplineInterpolator
Annotations
@Deprecated
Imports
org.apache.commons.math3.analysis.UnivariateFunction, org.apache.commons.math3.analysis.polynomials.PolynomialSplineFunction, org.apache.commons.math3.exception.DimensionMismatchException, .NoDataException, .NonMonotonicSequenceException, .NumberIsTooSmallException, org.apache.commons.math3.util.MathArrays

Deprecated

as of 3.4 replaced by org.apache.commons.math3.analysis.interpolation.PiecewiseBicubicSplineInterpolator

Generates a bicubic interpolating function. Due to numerical accuracy issues this should not be used.
Since
2.2

Field Summary

Modifier and TypeField and Description
private final boolean
initializeDerivatives

Whether to initialize internal data used to compute the analytical derivatives of the splines.

Constructor Summary

AccessConstructor and Description
public
BicubicSplineInterpolator()

Default constructor.

public
BicubicSplineInterpolator(boolean
Whether to initialize the internal data needed for calling any of the methods that compute the partial derivatives of the function returned from the call to interpolate.
initializeDerivatives
)

Creates an interpolator.

Method Summary

Modifier and TypeMethod and Description
public BicubicSplineInterpolatingFunction
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.

Deprecated as a consequence of BicubicSplineInterpolatingFunction being deprecated.

Compute an interpolating function for the dataset.

private int

Returns:

the next index.
nextIndex
(int
Index.
i
,
int
Upper limit of the array.
max
)

Computes the next index of an array, clipping if necessary.

private int

Returns:

the previous index.
previousIndex
(int
Index.
i
)

Computes the previous index of an array, clipping if necessary.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

initializeDerivativesback to summary
private final boolean initializeDerivatives

Whether to initialize internal data used to compute the analytical derivatives of the splines.

Constructor Detail

BicubicSplineInterpolatorback to summary
public BicubicSplineInterpolator()

Default constructor. The argument initializeDerivatives is set to false.

BicubicSplineInterpolatorback to summary
public BicubicSplineInterpolator(boolean initializeDerivatives)

Creates an interpolator.

Parameters
initializeDerivatives:boolean

Whether to initialize the internal data needed for calling any of the methods that compute the partial derivatives of the function returned from the call to interpolate.

Method Detail

interpolateback to summary
public BicubicSplineInterpolatingFunction 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.

Deprecated

as a consequence of BicubicSplineInterpolatingFunction being deprecated. See corresponding docs for further information.

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:BicubicSplineInterpolatingFunction

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
nextIndexback to summary
private int nextIndex(int i, int max)

Computes the next index of an array, clipping if necessary. It is assumed (but not checked) that i >= 0.

Parameters
i:int

Index.

max:int

Upper limit of the array.

Returns:int

the next index.

previousIndexback to summary
private int previousIndex(int i)

Computes the previous index of an array, clipping if necessary. It is assumed (but not checked) that i is smaller than the size of the array.

Parameters
i:int

Index.

Returns:int

the previous index.