Class PolynomialsUtils
- java.lang.Object
-
- org.apache.commons.math4.legacy.analysis.polynomials.PolynomialsUtils
-
public final class PolynomialsUtils extends Object
A collection of static methods that operate on or return polynomials.- Since:
- 2.0
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description 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 whose values at pointx
will be the same as the those from the original polynomial when computed atx + shift
.
-
-
-
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:
- 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:
- 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:
- 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:
- 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:
- Parameters:
degree
- degree of the polynomialv
- first exponentw
- second exponent- Returns:
- Jacobi polynomial of specified degree
-
shift
public static double[] shift(double[] coefficients, double shift)
Compute the coefficients of the polynomial whose values at pointx
will be the same as the those from the original polynomial when computed atx + shift
.More precisely, let
shift
and let . The returned array consists of the coefficients of . So if are the coefficients of , then the returned array satisfies the identity for all .- Parameters:
coefficients
- Coefficients of the original polynomial.shift
- Shift value.- Returns:
- the coefficients
of the shifted polynomial.
-
-