Class SplineInterpolator
java.lang.Object
org.esa.snap.core.dataio.geocoding.util.SplineInterpolator
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic doubleinterpolate(double[] x, double[] y, double[] deriv, double x_int) Calculates a spline interpolation at the location x_int.static doubleinterpolate(double[] y, double deriv, double x_int) Calculates a spline interpolation at the location x_int.static doubleinterpolate2d(double[][] data, double x, double y) static doubleinterpolate2d(double[] data, double[] derivatives, double x, double y)
-
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-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
-