Documentation of 'org.apache.commons.math3.analysis.polynomials.PolynomialFunctionLagrangeForm' Java class
PolynomialFunctionLagrangeForm
org.apache.commons.math3.analysis.polynomials

Class PolynomialFunctionLagrangeForm

  • All Implemented Interfaces:
    UnivariateFunction


    public class PolynomialFunctionLagrangeForm
    extends java.lang.Object
    implements UnivariateFunction
    Implements the representation of a real polynomial function in Lagrange Form. For reference, see Introduction to Numerical Analysis, ISBN 038795452X, chapter 2.

    The approximated function should be smooth enough for Lagrange polynomial to work well. Otherwise, consider using splines instead.

    Since:
    1.2
    • Constructor Summary

      Constructors 
      Constructor and Description
      PolynomialFunctionLagrangeForm(double[] x, double[] y)
      Construct a Lagrange polynomial with the given abscissas and function values.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      int degree()
      Returns the degree of the polynomial.
      static double evaluate(double[] x, double[] y, double z)
      Evaluate the Lagrange polynomial using Neville's Algorithm.
      double[] getCoefficients()
      Returns a copy of the coefficients array.
      double[] getInterpolatingPoints()
      Returns a copy of the interpolating points array.
      double[] getInterpolatingValues()
      Returns a copy of the interpolating values array.
      double value(double z)
      Calculate the function value at the given point.
      static boolean verifyInterpolationArray(double[] x, double[] y, boolean abort)
      Check that the interpolation arrays are valid.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • degree

        public int degree()
        Returns the degree of the polynomial.
        Returns:
        the degree of the polynomial
      • getInterpolatingPoints

        public double[] getInterpolatingPoints()
        Returns a copy of the interpolating points array.

        Changes made to the returned copy will not affect the polynomial.

        Returns:
        a fresh copy of the interpolating points array
      • getInterpolatingValues

        public double[] getInterpolatingValues()
        Returns a copy of the interpolating values array.

        Changes made to the returned copy will not affect the polynomial.

        Returns:
        a fresh copy of the interpolating values array
      • getCoefficients

        public double[] getCoefficients()
        Returns a copy of the coefficients array.

        Changes made to the returned copy will not affect the polynomial.

        Note that coefficients computation can be ill-conditioned. Use with caution and only when it is necessary.

        Returns:
        a fresh copy of the coefficients array

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.