public class Interpolator extends Object
A clean interface for performing interpolations. This is intentionaly designed to be similar to the Matlab "interpolate" command.
Modifier and Type | Class and Description |
---|---|
static class |
Interpolator.InterpolationAlgorithm |
Modifier and Type | Method and Description |
---|---|
static double[] |
interpolate(double[] x,
double[] y,
double[] xi,
Interpolator.InterpolationAlgorithm method,
boolean extrapolate)
Interpolates input data and evaluates the interpolation at a set of desired points.
|
public static double[] interpolate(double[] x, double[] y, double[] xi, Interpolator.InterpolationAlgorithm method, boolean extrapolate)
x
- input x data.y
- input y data.xi
- x points to evaluate the interpolation at.method
- interpolation method to use.extrapolate
- true if extrapolation is to be used for values outside of the x range; false if values outside the x range should return NaN.