Loading [MathJax]/extensions/tex2jax.js
A library for working with phylogenetic and population genetic data.
v0.32.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
distribution.cpp File Reference
#include "genesis/utils/math/distribution.hpp"
#include "genesis/utils/core/options.hpp"
#include "genesis/utils/math/binomial.hpp"
#include <cassert>
#include <cmath>
#include <cstdint>
#include <random>
#include <stdexcept>
#include <string>

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

size_t hypergeometric_distribution (size_t n1, size_t n2, size_t t)
 Select a random sample from a hypergeometric distribution. More...
 
size_t hypergeometric_distribution_gsl (size_t n1, size_t n2, size_t t)
 
size_t hypergeometric_distribution_inversion_mode_ (size_t n, size_t m, size_t N)
 
size_t hypergeometric_distribution_ratio_of_unifoms_ (size_t n, size_t m, size_t N)
 
std::vector< size_t > multinomial_distribution (std::vector< double > const &p, size_t n)
 Select a random sample following a multinomial distribution. More...
 
std::vector< size_t > multinomial_distribution (std::vector< size_t > const &p, size_t n)
 Select a random sample following a multinomial distribution. More...
 
template<class T >
std::vector< size_t > multinomial_distribution_ (std::vector< T > const &p, size_t n)
 
std::vector< size_t > multivariate_hypergeometric_distribution (std::vector< size_t > const &p, size_t n)
 Select a random sample following a multivariate hypergeometric distribution. More...