StdRandomDiscrete Method (Double) |
Namespace: Algs4Net
public static int Discrete( double[] probabilities )
Exception | Condition |
---|---|
ArgumentNullException | if probabilities is null |
ArgumentException | if sum of array entries is not (very nearly) equal to 1.0 |
ArgumentException | unless probabilities[i] >= 0.0 for each index i |