TSparseMtx.RandUniform Method

Overload List

#SignatureDescription
1function RandUniform: TMtxVec; overload;The pseudo random sample generator with continuous uniform distribution.
2function RandUniform(Seed: cardinal; aLow, aHigh: double): TMtxVec; overload;Fills the calling object values with pseudo random samples following the continuous uniform distribution.
3function RandUniform(aLow, aHigh: double): TMtxVec; overload;Fills the calling object values with pseudo random samples following the continuous uniform distribution.

Overload 1: function RandUniform: TMtxVec; overload;

The pseudo random sample generator with continuous uniform distribution.

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

Remarks:

Fills the calling object values with pseudo random samples following the continuous uniform distribution using the parameters Low = 0, High = 1. The value for the seed is obtained from the CPU clock.

Examples
var a: Matrix;
begin
    a.Size(10,10,False);
    a.RandUniform(0,5);
end;

Overload 2: function RandUniform(Seed: cardinal; aLow, aHigh: double): TMtxVec; overload;

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

#NameTypeDescription
1Seedcardinal
2aLowdoublescalar
3aHighdoublescalar

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

Remarks:

The algorithm uses parameters Low and High and Seed.

Overload 3: function RandUniform(aLow, aHigh: double): TMtxVec; overload;

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

#NameTypeDescription
1aLowdoublescalar
2aHighdoublescalar

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

Remarks:

The algorithm used parameters Low and High. The value for the seed is obtained from the CPU clock.