Class SplineInterpolator
- java.lang.Object
-
- org.esa.snap.core.dataio.geocoding.util.SplineInterpolator
-
public class SplineInterpolator extends Object
-
-
Constructor Summary
Constructors Constructor Description SplineInterpolator()
-
Method Summary
All Methods Static Methods Concrete Methods 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)
-
-
-
Method Detail
-
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-valuesderiv
- second derivative at the center pointx_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 locationsy
- vextor of y-valuesderiv
- vector of second derivatives at the sampling pointsx_int
- x-position to interpolate- Returns:
- the interpolated value
-
-