Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.commons.math3.analysis.polynomials
Class PolynomialsUtils

    java.lang.Object
      org.apache.commons.math3.analysis.polynomials.PolynomialsUtils

    public class PolynomialsUtils

extends Object

A collection of static methods that operate on or return polynomials.

Since:
  2.0
Version:
  $Id: PolynomialsUtils.java 1364387 2012-07-22 18:14:11Z tn $

Method Summary
`static PolynomialFunction` | `createChebyshevPolynomial(int degree)` Create a Chebyshev polynomial of the first kind.
`static PolynomialFunction` | `createHermitePolynomial(int degree)` Create a Hermite polynomial.
`static PolynomialFunction` | `createJacobiPolynomial(int degree, int v, int w)` Create a Jacobi polynomial.
`static PolynomialFunction` | `createLaguerrePolynomial(int degree)` Create a Laguerre polynomial.
`static PolynomialFunction` | `createLegendrePolynomial(int degree)` Create a Legendre polynomial.
`static double[]` | `shift(double[] coefficients, double shift)` Compute the coefficients of the polynomial `Ps(x)` whose values at point `x` will be the same as the those from the original polynomial `P(x)` when computed at `x + shift`.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### createChebyshevPolynomial

    public static PolynomialFunction createChebyshevPolynomial(int degree)

  Create a Chebyshev polynomial of the first kind.

  Chebyshev polynomials of the first kind are orthogonal polynomials. They can be defined by the following recurrence relations:

        T0(X)   = 1
        T1(X)   = X
        Tk+1(X) = 2X Tk(X) - Tk-1(X)

  Parameters:
    `degree` - degree of the polynomial
  Returns:
    Chebyshev polynomial of specified degree

### createHermitePolynomial

    public static PolynomialFunction createHermitePolynomial(int degree)

  Create a Hermite polynomial.

  Hermite polynomials are orthogonal polynomials. They can be defined by the following recurrence relations:

        H0(X)   = 1
        H1(X)   = 2X
        Hk+1(X) = 2X Hk(X) - 2k Hk-1(X)

  Parameters:
    `degree` - degree of the polynomial
  Returns:
    Hermite polynomial of specified degree

### createLaguerrePolynomial

    public static PolynomialFunction createLaguerrePolynomial(int degree)

  Create a Laguerre polynomial.

  Laguerre polynomials are orthogonal polynomials. They can be defined by the following recurrence relations:

              L0(X)   = 1
              L1(X)   = 1 - X
        (k+1) Lk+1(X) = (2k + 1 - X) Lk(X) - k Lk-1(X)

  Parameters:
    `degree` - degree of the polynomial
  Returns:
    Laguerre polynomial of specified degree

### createLegendrePolynomial

    public static PolynomialFunction createLegendrePolynomial(int degree)

  Create a Legendre polynomial.

  Legendre polynomials are orthogonal polynomials. They can be defined by the following recurrence relations:

              P0(X)   = 1
              P1(X)   = X
        (k+1) Pk+1(X) = (2k+1) X Pk(X) - k Pk-1(X)

  Parameters:
    `degree` - degree of the polynomial
  Returns:
    Legendre polynomial of specified degree

### createJacobiPolynomial

    public static PolynomialFunction createJacobiPolynomial(int degree,
                                                            int v,
                                                            int w)

  Create a Jacobi polynomial.

  Jacobi polynomials are orthogonal polynomials. They can be defined by the following recurrence relations:

              P0vw(X)   = 1
              P-1vw(X)  = 0
        2k(k + v + w)(2k + v + w - 2) Pkvw(X) =
        (2k + v + w - 1)[(2k + v + w)(2k + v + w - 2) X + v2 - w2] Pk-1vw(X)
        - 2(k + v - 1)(k + w - 1)(2k + v + w) Pk-2vw(X)

  Parameters:
    `degree` - degree of the polynomial
    `v` - first exponent
    `w` - second exponent
  Returns:
    Jacobi polynomial of specified degree

### shift

    public static double[] shift(double[] coefficients,
                                 double shift)

  Compute the coefficients of the polynomial `Ps(x)` whose values at point `x` will be the same as the those from the original polynomial `P(x)` when computed at `x + shift`. Thus, if `P(x) = Σi ai xi`, then

          Ps(x)
          = Σi bi xi

          = Σi ai (x + shift)i

  Parameters:
    `coefficients` - Coefficients of the original polynomial.
    `shift` - Shift value.
  Returns:
    the coefficients `bi` of the shifted polynomial.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.