Class GaussJacobiWeightAndAbscissaFunction
- java.lang.Object
-
- com.opengamma.strata.math.impl.integration.GaussJacobiWeightAndAbscissaFunction
-
- All Implemented Interfaces:
QuadratureWeightAndAbscissaFunction
public class GaussJacobiWeightAndAbscissaFunction extends Object implements QuadratureWeightAndAbscissaFunction
Class that generates weights and abscissas for Gauss-Jacobi quadrature. The weights $w_i$ are given by: $$ \begin{align*} w_i = \frac{2^{\alpha + \beta}(2n + \alpha + \beta)\Gamma(\alpha + n)\Gamma(\beta + n)} {n!\Gamma(n + \alpha + \beta + 1)J_i'(x_i) J_{i - 1}} \end{align*} $$ where $x_i$ is the $i^{th}$ root of the orthogonal polynomial, $J_i$ is the $i^{th}$ polynomial and $J_i'$ is the first derivative of the $i^{th}$ polynomial. The orthogonal polynomial is generated byJacobiPolynomialFunction
.
-
-
Constructor Summary
Constructors Constructor Description GaussJacobiWeightAndAbscissaFunction()
Creates an instance.GaussJacobiWeightAndAbscissaFunction(double alpha, double beta)
Creates an instance.
-
-
-
Constructor Detail
-
GaussJacobiWeightAndAbscissaFunction
public GaussJacobiWeightAndAbscissaFunction()
Creates an instance. Sets $\alpha = 0$ and $\beta = 0$
-
GaussJacobiWeightAndAbscissaFunction
public GaussJacobiWeightAndAbscissaFunction(double alpha, double beta)
Creates an instance.- Parameters:
alpha
- The value of $\alpha$ to use when generating the polynomialsbeta
- The value of $\beta$ to use when generating the polynomials
-
-
Method Detail
-
generate
public GaussianQuadratureData generate(int n)
- Specified by:
generate
in interfaceQuadratureWeightAndAbscissaFunction
- Parameters:
n
- The number of weights and abscissas to generate, not negative or zero- Returns:
- An object containing the weights and abscissas
-
-