|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.math3.analysis.interpolation.BicubicSplineInterpolatingFunction
public class BicubicSplineInterpolatingFunction
Function that implements the bicubic spline interpolation.
Field Summary | |
---|---|
private static double[][] |
AINV
Matrix to compute the spline coefficients from the function values and function derivatives values |
private BivariateFunction[][][] |
partialDerivatives
Partial derivatives The value of the first index determines the kind of derivatives: 0 = first partial derivatives wrt x 1 = first partial derivatives wrt y 2 = second partial derivatives wrt x 3 = second partial derivatives wrt y 4 = cross partial derivatives |
private BicubicSplineFunction[][] |
splines
Set of cubic splines patching the whole data grid |
private double[] |
xval
Samples x-coordinates |
private double[] |
yval
Samples y-coordinates |
Constructor Summary | |
---|---|
BicubicSplineInterpolatingFunction(double[] x,
double[] y,
double[][] f,
double[][] dFdX,
double[][] dFdY,
double[][] d2FdXdY)
|
Method Summary | |
---|---|
private void |
computePartialDerivatives()
Compute all partial derivatives. |
private double[] |
computeSplineCoefficients(double[] beta)
Compute the spline coefficients from the list of function values and function partial derivatives values at the four corners of a grid element. |
private double |
partialDerivative(int which,
double x,
double y)
|
double |
partialDerivativeX(double x,
double y)
|
double |
partialDerivativeXX(double x,
double y)
|
double |
partialDerivativeXY(double x,
double y)
|
double |
partialDerivativeY(double x,
double y)
|
double |
partialDerivativeYY(double x,
double y)
|
private int |
searchIndex(double c,
double[] val)
|
double |
value(double x,
double y)
Compute the value for the function. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final double[][] AINV
private final double[] xval
private final double[] yval
private final BicubicSplineFunction[][] splines
private BivariateFunction[][][] partialDerivatives
Constructor Detail |
---|
public BicubicSplineInterpolatingFunction(double[] x, double[] y, double[][] f, double[][] dFdX, double[][] dFdY, double[][] d2FdXdY) throws DimensionMismatchException, NoDataException, NonMonotonicSequenceException
x
- Sample values of the x-coordinate, in increasing order.y
- Sample values of the y-coordinate, in increasing order.f
- Values of the function on every grid point.dFdX
- Values of the partial derivative of function with respect
to x on every grid point.dFdY
- Values of the partial derivative of function with respect
to y on every grid point.d2FdXdY
- Values of the cross partial derivative of function on
every grid point.
DimensionMismatchException
- if the various arrays do not contain
the expected number of elements.
NonMonotonicSequenceException
- if x
or y
are
not strictly increasing.
NoDataException
- if any of the arrays has zero length.Method Detail |
---|
public double value(double x, double y) throws OutOfRangeException
value
in interface BivariateFunction
x
- Abscissa for which the function value should be computed.y
- Ordinate for which the function value should be computed.
OutOfRangeException
public double partialDerivativeX(double x, double y) throws OutOfRangeException
x
- x-coordinate.y
- y-coordinate.
OutOfRangeException
- if x
(resp. y
) is outside
the range defined by the boundary values of xval
(resp.
yval
).public double partialDerivativeY(double x, double y) throws OutOfRangeException
x
- x-coordinate.y
- y-coordinate.
OutOfRangeException
- if x
(resp. y
) is outside
the range defined by the boundary values of xval
(resp.
yval
).public double partialDerivativeXX(double x, double y) throws OutOfRangeException
x
- x-coordinate.y
- y-coordinate.
OutOfRangeException
- if x
(resp. y
) is outside
the range defined by the boundary values of xval
(resp.
yval
).public double partialDerivativeYY(double x, double y) throws OutOfRangeException
x
- x-coordinate.y
- y-coordinate.
OutOfRangeException
- if x
(resp. y
) is outside
the range defined by the boundary values of xval
(resp.
yval
).public double partialDerivativeXY(double x, double y) throws OutOfRangeException
x
- x-coordinate.y
- y-coordinate.
OutOfRangeException
- if x
(resp. y
) is outside
the range defined by the boundary values of xval
(resp.
yval
).private double partialDerivative(int which, double x, double y) throws OutOfRangeException
which
- First index in partialDerivatives
.x
- x-coordinate.y
- y-coordinate.
OutOfRangeException
- if x
(resp. y
) is outside
the range defined by the boundary values of xval
(resp.
yval
).private void computePartialDerivatives()
private int searchIndex(double c, double[] val)
c
- Coordinate.val
- Coordinate samples.
val
corresponding to the interval
containing c
, or -1
if c
is out of the
range defined by the boundary values of val
.private double[] computeSplineCoefficients(double[] beta)
beta
- List of function values and function partial derivatives
values.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |