Toggle navigation
Hot Examples
EN
EN
RU
DE
FR
ES
PT
IT
JP
ZH
KO
C#
PHP
C#
Java
Go
C++
Python
JS
TS
Search
Home
PeterO
RandomGenerator
Geometric
PeterO.RandomGenerator.Geometric C# (CSharp) Method
RandomGenerator Class Documentation
Show file
Open project: peteroupc/CBOR
Geometric()
public
method
Conceptually, generates either 1 or 0 until a 1 is generated, and counts the number of 0's generated. Either number has an equal probability of being generated.
public
Geometric
( ) :
int
return
int
public int Geometric() { return this.NegativeBinomial(1, 0.5); }
Same methods
RandomGenerator::
Geometric
(
double
p
) :
int
RandomGenerator
Bernoulli
Binomial
ChiSquared
Exponential
Gamma
Geometric
Hypergeometric
LogNormal
NegativeBinomial
NonZeroUniform
Normal
Poisson
RandomGenerator
Uniform
UniformInt
UniformLong
UniformSingle