A library for working with phylogenetic and population genetic data.
v0.32.0
random.hpp File Reference
#include <cstddef>
#include <cstdint>
#include <vector>

Go to the source code of this file.

Namespaces

 genesis
 Container namespace for all symbols of genesis in order to keep them separate when used as a library.
 
 genesis::utils
 

Functions

uint32_t permuted_congruential_generator ()
 Fast random number generator for 32bit integers. More...
 
uint32_t permuted_congruential_generator (uint32_t max)
 Fast random number generator for 32bit integers, for numbers in the range [0, max]. More...
 
uint32_t permuted_congruential_generator (uint32_t min, uint32_t max)
 Fast random number generator for 32bit integers, for numbers in the range [min, max]. More...
 
bool permuted_congruential_generator_bool ()
 Fast random number generator for 32bit integers, for bool with 0.5 probability. More...
 
bool permuted_congruential_generator_bool (uint32_t chance_one_in)
 Fast random number generator for 32bit integers, for bool with a given chance. More...
 
void permuted_congruential_generator_init (uint64_t seed)
 Set the seed for permuted_congruential_generator(). More...
 
std::vector< size_t > select_without_replacement (size_t k, size_t n)
 Select k many unique numbers out of the range [ 0, n ). More...