Class CubicSplineInterpolation2D

java.lang.Object
smile.interpolation.CubicSplineInterpolation2D
All Implemented Interfaces:
Serializable, Interpolation2D

public class CubicSplineInterpolation2D extends Object implements Interpolation2D
Cubic spline interpolation in a two-dimensional regular grid. It is similar to one-dimensional splines as it guarantees the continuity of the first and second function derivatives. Note that bicubic spline guarantees continuity of only gradient and cross-derivative.
See Also:
  • Constructor Details

    • CubicSplineInterpolation2D

      public CubicSplineInterpolation2D(double[] x1, double[] x2, double[][] y)
      Constructor.
      Parameters:
      x1 - the 1st dimension of data points.
      x2 - the 2nd dimension of data points.
      y - the function values at (x1, x2).
  • Method Details

    • interpolate

      public double interpolate(double x1p, double x2p)
      Description copied from interface: Interpolation2D
      Interpolate the data at a given 2-dimensional point.
      Specified by:
      interpolate in interface Interpolation2D
      Parameters:
      x1p - the 1st dimension value.
      x2p - the 2nd dimension value.
      Returns:
      the interpolated function value.
    • toString

      public String toString()
      Overrides:
      toString in class Object