StdRandomBernoulli Method (Double) |
Returns a random boolean from a Bernoulli distribution with success
probability P.
Namespace: Algs4NetAssembly: Algs4Net (in Algs4Net.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax public static bool Bernoulli(
double p
)
Parameters
- p
- Type: SystemDouble
p the probability of returning true
Return Value
Type:
Booleantrue with probability
p and
false with probability
pExceptions See Also