MtxIntDiff.WeightsGauss Method

procedure WeightsGauss(NumPoints: Integer; const Points: TVec; const Weights: TVec; const FloatPrecision: TMtxFloatPrecision);

Gauss base points and weights.

#NameTypeDescription
1NumPointsInteger
2PointsTVec
3WeightsTVec
4FloatPrecisionTMtxFloatPrecision

Result: stored in self (calling object)

Remarks:

Calculates base points and weight factors by using the so called Gauss algorithm given by Davis and Rabinowitz in 'Methods of Numerical Integration', page 365, Academic Press, 1975.

Examples
// Integrating function
function IntFunc(const Parameters: TVec; Const Constants: TVec; const ObjConst: Array of TObject): double;
var x: double;
begin
    x := Parameters[0];
    IntFunc := Sin(x);
end;
// Integrate
procedure DoIntegrate;
var bpoints,weights: Vector;
area: double;
begin
    WeightsGauss(10,bpoints,weights);
    area := QuadGauss(IntFunc,0,PI,bpoints,weights,1);
end;
See Also: MtxIntDiff.WeightsChebyshevGauss, MtxIntDiff.WeightsNewtonCotes