• All Implemented Interfaces:
Integrator<Double,​Double,​Function<Double,​Double>>

public class GaussLaguerreQuadratureIntegrator1D
extends GaussianQuadratureIntegrator1D
Gauss-Laguerre quadrature approximates the value of integrals of the form \begin{align*} \int_{0}^{\infty} e^{-x}f(x) dx \end{align*} The weights and abscissas are generated by GaussLaguerreWeightAndAbscissaFunction.

The function to integrate is scaled in such a way as to allow any values for the limits of integration. At present, this integrator can only be used for the limits $[0, \infty]$.

• ### Constructor Summary

Constructors
Constructor Description
GaussLaguerreQuadratureIntegrator1D​(int n)
Creates an instance.
GaussLaguerreQuadratureIntegrator1D​(int n, double alpha)
Creates an instance.
• ### Method Summary

All Methods
Modifier and Type Method Description
Function<Double,​Double> getIntegralFunction​(Function<Double,​Double> function, Double lower, Double upper)
Returns a function that is valid for both the type of quadrature and the limits of integration.
Double[] getLimits()
Gets the limits.
• ### Methods inherited from class com.opengamma.strata.math.impl.integration.GaussianQuadratureIntegrator1D

equals, hashCode, integrate, integrateFromPolyFunc
• ### Methods inherited from class com.opengamma.strata.math.impl.integration.Integrator1D

integrate
• ### Methods inherited from class java.lang.Object

clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
• ### Constructor Detail

public GaussLaguerreQuadratureIntegrator1D​(int n)
Creates an instance.
Parameters:
n - the value

public GaussLaguerreQuadratureIntegrator1D​(int n,
double alpha)
Creates an instance.
Parameters:
n - the value
alpha - the alpha
• ### Method Detail

• #### getLimits

public Double[] getLimits()
Description copied from class: GaussianQuadratureIntegrator1D
Gets the limits.
Specified by:
getLimits in class GaussianQuadratureIntegrator1D
Returns:
The lower and upper limits for which the quadrature is valid
• #### getIntegralFunction

public Function<Double,​Double> getIntegralFunction​(Function<Double,​Double> function,
Double lower,
Double upper)
Returns a function that is valid for both the type of quadrature and the limits of integration. The function $f(x)$ that is to be integrated is transformed into a form suitable for this quadrature method using: \begin{align*} \int_{0}^{\infty} f(x) dx &= \int_{0}^{\infty} f(x) e^x e^{-x} dx\\ &= \int_{0}^{\infty} g(x) e^{-x} dx \end{align*}
Specified by:
getIntegralFunction in class GaussianQuadratureIntegrator1D
Parameters:
function - The function to be integrated, not null
lower - The lower integration limit, not null
upper - The upper integration limit, not null
Returns:
A function in the appropriate form for integration
Throws:
UnsupportedOperationException - If the lower limit is not $-\infty$ or the upper limit is not $\infty$