Class SplineInterpolator

java.lang.Object
org.esa.snap.core.dataio.geocoding.util.SplineInterpolator

public class SplineInterpolator extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static double
    interpolate(double[] x, double[] y, double[] deriv, double x_int)
    Calculates a spline interpolation at the location x_int.
    static double
    interpolate(double[] y, double deriv, double x_int)
    Calculates a spline interpolation at the location x_int.
    static double
    interpolate2d(double[][] data, double x, double y)
     
    static double
    interpolate2d(double[] data, double[] derivatives, double x, double y)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SplineInterpolator

      public SplineInterpolator()
  • Method Details

    • interpolate

      public static double interpolate(double[] y, double deriv, double x_int)
      Calculates a spline interpolation at the location x_int. Simplified version of Numerical Recipes code, streamlined to process three points. X-locations are assumed to run 0 -> 2
      Parameters:
      y - vector of y-values
      deriv - second derivative at the center point
      x_int - x-position to interpolate
      Returns:
      the interpolated value
    • interpolate2d

      public static double interpolate2d(double[] data, double[] derivatives, double x, double y)
    • interpolate2d

      public static double interpolate2d(double[][] data, double x, double y)
    • interpolate

      public static double interpolate(double[] x, double[] y, double[] deriv, double x_int)
      Calculates a spline interpolation at the location x_int. Coded from Numerical Recipes.
      Parameters:
      x - vector of x locations
      y - vextor of y-values
      deriv - vector of second derivatives at the sampling points
      x_int - x-position to interpolate
      Returns:
      the interpolated value