Class TabulatedGaussLegendre
The tabulated Gauss-Legendre quadratures of orders 6, 7, 12 and 20 on [−1, 1], their abscissas and weights from Abramowitz and Stegun to 15 decimals.
public sealed class TabulatedGaussLegendre
- Inheritance
-
TabulatedGaussLegendre
- Inherited Members
Remarks
Immutable: Order(int) returns a copy of another order, where QuantLib's changes it.
Constructors
TabulatedGaussLegendre(int)
Initializes a new instance of the TabulatedGaussLegendre class.
public TabulatedGaussLegendre(int n = 20)
Parameters
nintThe order: 6, 7, 12 or 20.
Exceptions
- ArgumentException
The order isn't tabulated.
Methods
Evaluate(Func<double, double>)
The weighted sum of f at the abscissas: the middle one first for an odd order, then each
positive abscissa and its negative.
public double Evaluate(Func<double, double> f)
Parameters
Returns
- double
Σ wᵢ·f(xᵢ).
Exceptions
- ArgumentNullException
fis null.
Order()
The order.
public int Order()
Returns
- int
6, 7, 12 or 20.
Order(int)
A copy of the quadrature of another order, QuantLib's order(Size).
public TabulatedGaussLegendre Order(int order)
Parameters
orderintThe order: 6, 7, 12 or 20.
Returns
- TabulatedGaussLegendre
The quadrature of that order.
Exceptions
- ArgumentException
The order isn't tabulated.