Class PolynomialInterpolator

  • All Implemented Interfaces:
    Interpolator

    public class PolynomialInterpolator
    extends Object
    implements Interpolator
    A polynomial interpolation function.

    This was done basing on the Java Number Cruncher Book by Ronald Mak (see http://www.apropos-logic.com/books.html).

    Author:
    Andrea Antonello (www.hydrologis.com)
    • Constructor Detail

      • PolynomialInterpolator

        public PolynomialInterpolator​(List<Double> xList,
                                      List<Double> yList)
        Constructor.
        Parameters:
        xList - the list of X samples.
        yList - the list of Y = f(X) samples.
    • Method Detail

      • 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.