TRngStream.RandomBinomial Method

void RandomBinomial(TMtxVecInt Dst, Int32 n, Double p)

Generates an array of integer samples distributed Binomially.

#NameTypeDescription
1DstTMtxVecIntsource TVecInt or TMtxInt
2nInt32
3pDoublescalar

Result: stored in self (calling object)

Remarks:

Returns random numbers distributed according to the Binomial probability density function (PDF) as defined here Dew.Math.Units.Probabilities.BinomPDF. The number of samples generated is defined with the Dst.Length parameter. The result is an array of integers which can be accessed via Dst.IValues property. Dst is automatically resized to store 32bit integers, if needed.