Class LinearListInterpolator
- java.lang.Object
-
- org.hortonmachine.gears.utils.math.interpolation.LinearListInterpolator
-
- All Implemented Interfaces:
Interpolator
public class LinearListInterpolator extends Object implements Interpolator
A class for doing linear interpolations on lists of X and Y.- Author:
- Andrea Antonello (www.hydrologis.com)
-
-
Constructor Summary
Constructors Constructor Description LinearListInterpolator(List<Double> xList, List<Double> yList)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doublegetInterpolated(double x)Returns the interpolated value y=f(x).DoublelinearInterpolateX(Double yValue)A simple interpolation between existing numbers.DoublelinearInterpolateY(Double xValue)A simple interpolation between existing numbers.
-
-
-
Method Detail
-
linearInterpolateY
public Double linearInterpolateY(Double xValue)
A simple interpolation between existing numbers.- Parameters:
xValue- the value for which we want the y- Returns:
- the y value
-
linearInterpolateX
public Double linearInterpolateX(Double yValue)
A simple interpolation between existing numbers.- Parameters:
yValue- the value for which we want the x- Returns:
- the x value
-
getInterpolated
public double getInterpolated(double x)
Description copied from interface:InterpolatorReturns the interpolated value y=f(x).- Specified by:
getInterpolatedin interfaceInterpolator- Parameters:
x- the value of x.- Returns:
- the interpolated value of y.
-
-