CategoricalSamplesWithCumulativeDistribution(Random, Double) Method |
Samples a categorically distributed random variable.
Namespace: Altaxo.Calc.DistributionsAssembly: AltaxoCore (in AltaxoCore.dll) Version: 4.8.3179.0 (4.8.3179.0)
Syntax public static IEnumerable<int> SamplesWithCumulativeDistribution(
Random rnd,
double[] cdfUnnormalized
)
Parameters
- rnd Random
- The random number generator to use.
- cdfUnnormalized Double
- An array of the cumulative distribution. Not assumed to be normalized.
Return Value
IEnumerableInt32random integers between 0 and the size of the categorical (exclusive).
See Also