TSparseMtx.RandGauss Method

Overload List

#SignatureDescription
1function RandGauss: TMtxVec; overload;The pseudo random sample generator with Gaussian distribution.
2function RandGauss(Seed: cardinal; AMean, AStdDev: double): TMtxVec; overload;Fills the calling object values with pseudo random samples following the Gaussian distribution.
3function RandGauss(AMean, AStdDev: double): TMtxVec; overload;Fills the calling object values with pseudo random samples following the Gaussian distribution.

Overload 1: function RandGauss: TMtxVec; overload;

The pseudo random sample generator with Gaussian distribution.

Result: stored in self (calling object), returns self for chaining

Remarks:

Fills the calling object values with pseudo random samples following the Gaussian distribution with parameters: Mean = 0, StdDev = 1 ("Standard disctribution"). The value for the seed is obtained from the CPU clock.

Examples
var a: Matrix;
begin
    a.Size(50,10,False);
    a.RandGauss;
end;

Overload 2: function RandGauss(Seed: cardinal; AMean, AStdDev: double): TMtxVec; overload;

Fills the calling object values with pseudo random samples following the Gaussian distribution.

#NameTypeDescription
1Seedcardinal
2AMeandoublepre-computed mean
3AStdDevdoubleoutput std deviation

Result: stored in self (calling object), returns self for chaining

Remarks:

The algorithm uses parameters AMean, AStdDev and Seed.

Overload 3: function RandGauss(AMean, AStdDev: double): TMtxVec; overload;

Fills the calling object values with pseudo random samples following the Gaussian distribution.

#NameTypeDescription
1AMeandoublepre-computed mean
2AStdDevdoubleoutput std deviation

Result: stored in self (calling object), returns self for chaining

Remarks:

The algorithm uses parameter AMean and AStdDev. The value for the seed is obtained from the CPU clock.