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:
rng (fwdpy11.GSLrng) – Random number generator
sd (float) – The standard deviation
- Returns:
A gaussian deviate with mean zero and standard deviation
sd
- Return type:
- fwdpy11.gsl_rng_uniform()#
- Parameters:
rng (fwdpy11.GSLrng) – Random number generator
- Returns:
Uniform deviate from the range
[0, 1)
- Return type:
- 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:
- 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:
- fwdpy11.gsl_ran_geometric()#
- Parameters:
rng (fwdpy11.GSLrng) – Random number generator
p (float) – The probability of success
- Returns:
The waiting time until the next success
- Return type: