org.apache.commons.math3.analysis.interpolation

## 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.

Version:
  $Id: BicubicSplineInterpolatingFunction.java 1379904 2012-09-01 23:54:52Z erans $

### Field Summary

Fields
`private double[][]` `a` Coefficients
`private 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 and Description
`BicubicSplineFunction(double[] a)` Simple constructor.

### Method Summary

Methods
`private double` `apply(double[] pX, double[] pY, double[][] coeff)` Compute the value of the bicubic polynomial.
`private void` `computePartialDerivatives()` Compute all partial derivatives functions.
`BivariateFunction` `partialDerivativeX()`
`BivariateFunction` `partialDerivativeXX()`
`BivariateFunction` `partialDerivativeXY()`
`BivariateFunction` `partialDerivativeY()`
`BivariateFunction` `partialDerivativeYY()`
`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

#### N

    private static final short N

Number of points.

See Also:
  Constant Field Values

#### a

    private final double[][] a

Coefficients

#### partialDerivativeX

    private BivariateFunction partialDerivativeX

First partial derivative along x.

#### partialDerivativeY

    private BivariateFunction partialDerivativeY

First partial derivative along y.

#### partialDerivativeXX

    private BivariateFunction partialDerivativeXX

Second partial derivative along x.

#### partialDerivativeYY

    private BivariateFunction partialDerivativeYY

Second partial derivative along y.

#### partialDerivativeXY

    private BivariateFunction partialDerivativeXY

Second crossed partial derivative.

### Constructor Detail

#### BicubicSplineFunction

    public BicubicSplineFunction(double[] a)

Simple constructor.

Parameters:
  `a` - Spline coefficients

### Method Detail

#### value

    public double value(double x,
               double y)

Compute the value for the function.

Specified by:
  `value` in interface `BivariateFunction`
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.

#### computePartialDerivatives

    private void computePartialDerivatives()

Compute all partial derivatives functions.