StdRandomGeometric Method |
Returns a random integer from a geometric distribution with success
probability P.
Namespace: Algs4NetAssembly: Algs4Net (in Algs4Net.dll) Version: 1.0.0.0 (1.0.0.0)
Syntaxpublic static int Geometric(
double p
)
Parameters
- p
- Type: SystemDouble
p the parameter of the geometric distribution
Return Value
Type:
Int32a random integer from a geometric distribution with success
probability
p; or
int.MaxValue if
p is (nearly) equal to
1.0.
Exceptions
See Also