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

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

double binomial_coefficient (size_t n, size_t k)
 Compute the binomial coefficient, that is n choose k, for two integer numbers, for large numbers. More...
 
size_t binomial_coefficient_int (size_t n, size_t k)
 Compute the binomial coefficient, that is n choose k, for two integer numbers. More...
 
double binomial_distribution (size_t k, size_t n, double p)
 Compute the probability mass function for a binomial distribution. More...
 
double log_binomial_coefficient (size_t n, size_t k)
 Compute the logarithm (base e) of the binomial coefficient, that is n choose k, for two integer numbers, for large numbers. More...
 
double log_binomial_distribution (size_t k, size_t n, double p)
 Compute the logarithm (base e) of the probability mass function for a binomial distribution. More...
 
double log_factorial (size_t n)
 Return the logarithm (base e) of the factorial of n, that is log(n!). More...