Class BicubicSplineFunction
- java.lang.Object
-
- org.apache.commons.math3.analysis.interpolation.BicubicSplineFunction
-
- All Implemented Interfaces:
BivariateFunction
class BicubicSplineFunction extends java.lang.Object implements BivariateFunction
2D-spline function.
-
-
Field Summary
Fields Modifier and Type Field Description private double[][]
a
Coefficientsprivate static short
N
Number of points.private BivariateFunction
partialDerivativeX
First partial derivative along x.private BivariateFunction
partialDerivativeXX
Second partial derivative along x.private BivariateFunction
partialDerivativeXY
Second crossed partial derivative.private BivariateFunction
partialDerivativeY
First partial derivative along y.private BivariateFunction
partialDerivativeYY
Second partial derivative along y.
-
Constructor Summary
Constructors Constructor Description BicubicSplineFunction(double[] coeff)
Simple constructor.BicubicSplineFunction(double[] coeff, boolean initializeDerivatives)
Simple constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private double
apply(double[] pX, double[] pY, double[][] coeff)
Compute the value of the bicubic polynomial.BivariateFunction
partialDerivativeX()
BivariateFunction
partialDerivativeXX()
BivariateFunction
partialDerivativeXY()
BivariateFunction
partialDerivativeY()
BivariateFunction
partialDerivativeYY()
double
value(double x, double y)
Compute the value for the function.
-
-
-
Field Detail
-
N
private static final short N
Number of points.- See Also:
- Constant Field Values
-
a
private final double[][] a
Coefficients
-
partialDerivativeX
private final BivariateFunction partialDerivativeX
First partial derivative along x.
-
partialDerivativeY
private final BivariateFunction partialDerivativeY
First partial derivative along y.
-
partialDerivativeXX
private final BivariateFunction partialDerivativeXX
Second partial derivative along x.
-
partialDerivativeYY
private final BivariateFunction partialDerivativeYY
Second partial derivative along y.
-
partialDerivativeXY
private final BivariateFunction partialDerivativeXY
Second crossed partial derivative.
-
-
Constructor Detail
-
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 Detail
-
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
public BivariateFunction partialDerivativeX()
- Returns:
- the partial derivative wrt
x
.
-
partialDerivativeY
public BivariateFunction partialDerivativeY()
- Returns:
- the partial derivative wrt
y
.
-
partialDerivativeXX
public BivariateFunction partialDerivativeXX()
- Returns:
- the second partial derivative wrt
x
.
-
partialDerivativeYY
public BivariateFunction partialDerivativeYY()
- Returns:
- the second partial derivative wrt
y
.
-
partialDerivativeXY
public BivariateFunction partialDerivativeXY()
- Returns:
- the second partial cross-derivative.
-
-