TRngStream.RandomBernoulli Method

procedure RandomBernoulli(const Dst: TMtxVecInt; const p: Double);

Generates an array of integer samples distributed by Bernoulli distribution.

#NameTypeDescription
1DstTMtxVecInt
2pDouble

Result: stored in self (calling object)

Remarks:

Returns random numbers distributed according to the Bernoulli distribution. The number of samples generated is defined with the Dst.Length parameter. Dst is automatically resized to store 32bit integers, if needed.