Namespaces

Types in MathNet.Numerics.Integration

Type GaussLegendreRule

Namespace MathNet.Numerics.Integration

Approximates a definite integral using an Nth order Gauss-Legendre rule. Precomputed Gauss-Legendre abscissas/weights for orders 2-20, 32, 64, 96, 100, 128, 256, 512, 1024 are used, otherwise they're calulcated on the fly.

Constructors

Static Functions

Methods

Properties

Public Constructors

GaussLegendreRule(double intervalBegin, double intervalEnd, int order)

Initializes a new instance of the GaussLegendreRule class.
Parameters
double intervalBegin

Where the interval starts, inclusive and finite.

double intervalEnd

Where the interval stops, inclusive and finite.

int order

Defines an Nth order Gauss-Legendre rule. The order also defines the number of abscissas and weights for the rule. Precomputed Gauss-Legendre abscissas/weights for orders 2-20, 32, 64, 96, 100, 128, 256, 512, 1024 are used, otherwise they're calulcated on the fly.

Public Static Functions

double Integrate(Func<double, double> f, double invervalBegin, double invervalEnd, int order)

Approximates a definite integral using an Nth order Gauss-Legendre rule.
Parameters
Func<double, double> f

The analytic smooth function to integrate.

double invervalBegin

Where the interval starts, exclusive and finite.

double invervalEnd

Where the interval ends, exclusive and finite.

int order

Defines an Nth order Gauss-Legendre rule. The order also defines the number of abscissas and weights for the rule. Precomputed Gauss-Legendre abscissas/weights for orders 2-20, 32, 64, 96, 100, 128, 256, 512, 1024 are used, otherwise they're calulcated on the fly.

Return
double

Approximation of the finite integral in the given interval.

double Integrate(Func<double, double, double> f, double invervalBeginA, double invervalEndA, double invervalBeginB, double invervalEndB, int order)

Approximates a 2-dimensional definite integral using an Nth order Gauss-Legendre rule over the rectangle [a,b] x [c,d].
Parameters
Func<double, double, double> f

The 2-dimensional analytic smooth function to integrate.

double invervalBeginA

Where the interval starts for the first (inside) integral, exclusive and finite.

double invervalEndA

Where the interval ends for the first (inside) integral, exclusive and finite.

double invervalBeginB

Where the interval starts for the second (outside) integral, exclusive and finite.

double invervalEndB

Where the interval ends for the second (outside) integral, exclusive and finite.

int order

Defines an Nth order Gauss-Legendre rule. The order also defines the number of abscissas and weights for the rule. Precomputed Gauss-Legendre abscissas/weights for orders 2-20, 32, 64, 96, 100, 128, 256, 512, 1024 are used, otherwise they're calulcated on the fly.

Return
double

Approximation of the finite integral in the given interval.

Public Methods

bool Equals(object obj)

double GetAbscissa(int index)

Gettter for the ith abscissa.
Parameters
int index

Index of the ith abscissa.

Return
double

The ith abscissa.

int GetHashCode()

Type GetType()

double GetWeight(int index)

Getter for the ith weight.
Parameters
int index

Index of the ith weight.

Return
double

The ith weight.

string ToString()

Public Properties

Double[] Abscissas get;

Getter that returns a clone of the array containing the abscissas.

double IntervalBegin get;

Getter for the InvervalBegin.

double IntervalEnd get;

Getter for the InvervalEnd.

int Order get;

Getter for the order.

Double[] Weights get;

Getter that returns a clone of the array containing the weights.