Class PolynomialsUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic PolynomialFunctioncreateChebyshevPolynomial(int degree) Create a Chebyshev polynomial of the first kind.static PolynomialFunctioncreateHermitePolynomial(int degree) Create a Hermite polynomial.static PolynomialFunctioncreateJacobiPolynomial(int degree, int v, int w) Create a Jacobi polynomial.static PolynomialFunctioncreateLaguerrePolynomial(int degree) Create a Laguerre polynomial.static PolynomialFunctioncreateLegendrePolynomial(int degree) Create a Legendre polynomial.static double[]shift(double[] coefficients, double shift) Compute the coefficients of the polynomial whose values at pointxwill be the same as the those from the original polynomial when computed atx + shift.
-
Method Details
-
createChebyshevPolynomial
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
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
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
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
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 pointxwill be the same as the those from the original polynomial when computed atx + shift.More precisely, let
shiftand 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.
-