Class Interpolator
java.lang.Object
com.illumon.numerics.interpolation.Interpolator
A clean interface for performing interpolations.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic 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.
-
Method Details
-
interpolate
public 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.- Parameters:
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.- Returns:
- y values interpolated at points xi if xi is in range(x), and y values extrapolated based on the extrapolate flag if xi is not in range(x).
-