Class 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 Detail

      • LinearListInterpolator

        public LinearListInterpolator​(List<Double> xList,
                                      List<Double> yList)
    • 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: Interpolator
        Returns the interpolated value y=f(x).
        Specified by:
        getInterpolated in interface Interpolator
        Parameters:
        x - the value of x.
        Returns:
        the interpolated value of y.