public class PolynomialsUtils extends Object
Modifier and Type | Method and 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 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 . |
public static PolynomialFunction createChebyshevPolynomial(int degree)
Chebyshev polynomials of the first kind are orthogonal polynomials. They can be defined by the following recurrence relations:
T0(x)=1T1(x)=xTk+1(x)=2xTk(x)−Tk−1(x)
degree
- degree of the polynomialpublic static PolynomialFunction createHermitePolynomial(int degree)
Hermite polynomials are orthogonal polynomials. They can be defined by the following recurrence relations:
H0(x)=1H1(x)=2xHk+1(x)=2xHk(X)−2kHk−1(x)
degree
- degree of the polynomialpublic static PolynomialFunction createLaguerrePolynomial(int degree)
Laguerre polynomials are orthogonal polynomials. They can be defined by the following recurrence relations:
L0(x)=1L1(x)=1−x(k+1)Lk+1(x)=(2k+1−x)Lk(x)−kLk−1(x)
degree
- degree of the polynomialpublic static PolynomialFunction createLegendrePolynomial(int degree)
Legendre polynomials are orthogonal polynomials. They can be defined by the following recurrence relations:
P0(x)=1P1(x)=x(k+1)Pk+1(x)=(2k+1)xPk(x)−kPk−1(x)
degree
- degree of the polynomialpublic static PolynomialFunction createJacobiPolynomial(int degree, int v, int w)
Jacobi polynomials are orthogonal polynomials. They can be defined by the following recurrence relations:
Pvw0(x)=1Pvw−1(x)=02k(k+v+w)(2k+v+w−2)Pvwk(x)=(2k+v+w−1)[(2k+v+w)(2k+v+w−2)x+v2−w2]Pvwk−1(x)−2(k+v−1)(k+w−1)(2k+v+w)Pvwk−2(x)
degree
- degree of the polynomialv
- first exponentw
- second exponentpublic static double[] shift(double[] coefficients, double shift)
x
will be the same as the those from the
original polynomial P(x) when computed at x + shift
.
More precisely, let Δ= shift
and let
Ps(x)=P(x+Δ). The returned array
consists of the coefficients of Ps. So if a0,...,an−1
are the coefficients of P, then the returned array
b0,...,bn−1 satisfies the identity
∑n−1i=0bixi=∑n−1i=0ai(x+Δ)i for all x.
coefficients
- Coefficients of the original polynomial.shift
- Shift value.Copyright © 2016-2021 CS GROUP. All rights reserved.