Documentation of 'umontreal.iro.lecuyer.functionfit.PolInterp' Java class
PolInterp
umontreal.iro.lecuyer.functionfit

Class PolInterp

    • Constructor Detail

      • PolInterp

        public PolInterp(double[] x,
                         double[] y)
        Constructs a new polynomial interpolating through the given points (x[0], y[0]), ..., (x[n], y[n]). This constructs a polynomial of degree n from n+1 points.
        Parameters:
        x - the x coordinates of the points.
        y - the y coordinates of the points.
        Throws:
        java.lang.NullPointerException - if x or y are null.
        java.lang.IllegalArgumentException - if the lengths of x and y are different, or if less than two points are specified.
    • Method Detail

      • getCoefficients

        public static double[] getCoefficients(double[] x,
                                               double[] y)
        Computes and returns the coefficients the polynomial interpolating through the given points (x[0], y[0]), ..., (x[n], y[n]). This polynomial has degree n and there are n+1 coefficients.
        Parameters:
        x - the x coordinates of the points.
        y - the y coordinates of the points.
        Returns:
        the coefficients the interpolating polynomial.
      • getX

        public double[] getX()
        Returns the x coordinates of the interpolated points.
        Returns:
        the x coordinates of the interpolated points.
      • getY

        public double[] getY()
        Returns the y coordinates of the interpolated points.
        Returns:
        the y coordinates of the interpolated points.
      • toString

        public static java.lang.String toString(double[] x,
                                                double[] y)
        Makes a string representation of a set of points.
        Parameters:
        x - the x coordinates of the points.
        y - the y coordinates of the points.
        Returns:
        the string representing the points.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.