Table of Contents

Class TabulatedGaussLegendre

Namespace
NanoQL.Numerics
Assembly
NanoQL.dll

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

n int

The 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

f Func<double, double>

The function.

Returns

double

Σ wᵢ·f(xᵢ).

Exceptions

ArgumentNullException

f is 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

order int

The order: 6, 7, 12 or 20.

Returns

TabulatedGaussLegendre

The quadrature of that order.

Exceptions

ArgumentException

The order isn't tabulated.