The OpenD Programming Language

randGeometric

  1. size_t randGeometric(G gen)
  2. size_t randGeometric(G* gen)
  3. size_t randGeometric()
    size_t
    randGeometric
    ()
    ()

Return Value

Type: size_t

n >= 0 such that P(n) := 1 / (2^^(n + 1)).

Examples

size_t s = randGeometric;
import mir.random.engine.xoshiro;
auto gen = Xoroshiro128Plus(1);

size_t s = gen.randGeometric;

Meta