Class GaussLaguerreWeightAndAbscissaFunction
- java.lang.Object
-
- com.opengamma.strata.math.impl.integration.GaussLaguerreWeightAndAbscissaFunction
-
- All Implemented Interfaces:
QuadratureWeightAndAbscissaFunction
public class GaussLaguerreWeightAndAbscissaFunction extends Object implements QuadratureWeightAndAbscissaFunction
Class that generates weights and abscissas for Gauss-Laguerre quadrature. The weights $w_i$ are given by: $$ \begin{align*} w_i = -\frac{\Gamma(\alpha + n)}{n!L_i'(x_i)L_{i-1}(x_i)} \end{align*} $$ where $x_i$ is the $i^{th}$ root of the orthogonal polynomial, $L_i$ is the $i^{th}$ polynomial and $L_i'$ is the first derivative of the $i^{th}$ polynomial. The orthogonal polynomial is generated byLaguerrePolynomialFunction
.
-
-
Constructor Summary
Constructors Constructor Description GaussLaguerreWeightAndAbscissaFunction()
Creates an instance.GaussLaguerreWeightAndAbscissaFunction(double alpha)
Creates an instance.
-
-
-
Constructor Detail
-
GaussLaguerreWeightAndAbscissaFunction
public GaussLaguerreWeightAndAbscissaFunction()
Creates an instance. Sets $\alpha = 0$
-
GaussLaguerreWeightAndAbscissaFunction
public GaussLaguerreWeightAndAbscissaFunction(double alpha)
Creates an instance.- Parameters:
alpha
- The value of $\alpha$ 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
-
-