void WeightsGauss(Int32 NumPoints, TVec Points, TVec Weights, TMtxFloatPrecision FloatPrecision)
Gauss base points and weights.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | NumPoints | Int32 | |
| 2 | Points | TVec | source TVec |
| 3 | Weights | TVec | source TVec |
| 4 | FloatPrecision | TMtxFloatPrecision |
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
private double IntFun(TVec x, TVec c, params object[] o)
{
double x = x[0];
return System.Math.Sin(x)*System.Math.Exp(-x*x);
}
private void Example()
{
Vector bpoints = new Vector(0);
Vector weights = new Vector(0);
MtxIntDiff.WeightsGauss(10,bpoints,weights);
double area = MtxIntDif.QuadGauss(IntFun,-0.5*System.Math.PI,System.Math.PI,bpoints,weights,64);
}