Random number distributions#

The following functions map directly to C functions from the GNU Scientific Library. All functions take positional arguments without names.

fwdpy11.gsl_ran_gaussian_ziggurat()#
Parameters:
Returns:

A gaussian deviate with mean zero and standard deviation sd

Return type:

float

fwdpy11.gsl_rng_uniform()#
Parameters:

rng (fwdpy11.GSLrng) – Random number generator

Returns:

Uniform deviate from the range [0, 1)

Return type:

float

fwdpy11.gsl_ran_flat()#
Parameters:
  • rng (fwdpy11.GSLrng) – Random number generator

  • a (float) – Lower bound of range, inclusive.

  • b (float) – Upper bound of range, exclusive.

Returns:

Uniform deviate from the range [a, b).

Return type:

float

fwdpy11.gsl_ran_poisson()#
Parameters:
  • rng (fwdpy11.GSLrng) – Random number generator

  • mean (float) – The mean of the distribution

Returns:

The number of successes

Return type:

int

fwdpy11.gsl_ran_geometric()#
Parameters:
Returns:

The waiting time until the next success

Return type:

int