CategoricalSample(Random, Double) Method |
Samples one categorical distributed random variable; also known as the Discrete distribution.
Namespace: Altaxo.Calc.DistributionsAssembly: AltaxoCore (in AltaxoCore.dll) Version: 4.8.3179.0 (4.8.3179.0)
Syntax public static int Sample(
Random rnd,
double[] probabilityMass
)
Parameters
- rnd Random
- The random number generator to use.
- probabilityMass Double
- An array of nonnegative ratios. Not assumed to be normalized.
Return Value
Int32One random integer between 0 and the size of the categorical (exclusive).
See Also