Class BicubicSplineFunction
java.lang.Object
org.apache.commons.math3.analysis.interpolation.BicubicSplineFunction
- All Implemented Interfaces:
BivariateFunction
2D-spline function.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final double[][]
Coefficientsprivate static final short
Number of points.private final BivariateFunction
First partial derivative along x.private final BivariateFunction
Second partial derivative along x.private final BivariateFunction
Second crossed partial derivative.private final BivariateFunction
First partial derivative along y.private final BivariateFunction
Second partial derivative along y. -
Constructor Summary
ConstructorsConstructorDescriptionBicubicSplineFunction
(double[] coeff) Simple constructor.BicubicSplineFunction
(double[] coeff, boolean initializeDerivatives) Simple constructor. -
Method Summary
-
Field Details
-
N
private static final short NNumber of points.- See Also:
-
a
private final double[][] aCoefficients -
partialDerivativeX
First partial derivative along x. -
partialDerivativeY
First partial derivative along y. -
partialDerivativeXX
Second partial derivative along x. -
partialDerivativeYY
Second partial derivative along y. -
partialDerivativeXY
Second crossed partial derivative.
-
-
Constructor Details
-
BicubicSplineFunction
BicubicSplineFunction(double[] coeff) Simple constructor.- Parameters:
coeff
- Spline coefficients.
-
BicubicSplineFunction
BicubicSplineFunction(double[] coeff, boolean initializeDerivatives) Simple constructor.- Parameters:
coeff
- Spline coefficients.initializeDerivatives
- Whether to initialize the internal data needed for calling any of the methods that compute the partial derivatives this function.
-
-
Method Details
-
value
public double value(double x, double y) Compute the value for the function.- Specified by:
value
in interfaceBivariateFunction
- Parameters:
x
- Abscissa for which the function value should be computed.y
- Ordinate for which the function value should be computed.- Returns:
- the value.
-
apply
private double apply(double[] pX, double[] pY, double[][] coeff) Compute the value of the bicubic polynomial.- Parameters:
pX
- Powers of the x-coordinate.pY
- Powers of the y-coordinate.coeff
- Spline coefficients.- Returns:
- the interpolated value.
-
partialDerivativeX
- Returns:
- the partial derivative wrt
x
.
-
partialDerivativeY
- Returns:
- the partial derivative wrt
y
.
-
partialDerivativeXX
- Returns:
- the second partial derivative wrt
x
.
-
partialDerivativeYY
- Returns:
- the second partial derivative wrt
y
.
-
partialDerivativeXY
- Returns:
- the second partial cross-derivative.
-