Class GaussLegendreIntegrator
The integral over [a, b] by the Gauss-Legendre quadrature of a given order, mapped from [−1, 1]: QuantLib's
detail::GaussianQuadratureIntegrator<GaussLegendreIntegration>. It counts no evaluation, as QuantLib's
doesn't.
public sealed class GaussLegendreIntegrator : Integrator
- Inheritance
-
GaussLegendreIntegrator
- Inherited Members
Constructors
GaussLegendreIntegrator(int)
Initializes a new instance of the GaussLegendreIntegrator class.
public GaussLegendreIntegrator(int n)
Parameters
nintThe order, positive; QuantLib's maximum number of evaluations too.
Exceptions
- ArgumentOutOfRangeException
nis negative.- ArgumentException
nis zero.
Methods
GetIntegration()
The quadrature.
public GaussLegendreIntegration GetIntegration()
Returns
- GaussLegendreIntegration
The quadrature, immutable.
IntegrateCore(Func<double, double>, double, double)
The rule's integral over [a, b], a below b, with the number of evaluations it made and its error estimate, if it computes one.
protected override IntegrationResult IntegrateCore(Func<double, double> f, double a, double b)
Parameters
Returns
- IntegrationResult
The integral, the number of evaluations and the error estimate, or null for none.