GeNN  4.9.0
GPU enhanced Neuronal Networks (GeNN)
binomial.cc File Reference
#include "binomial.h"
#include <limits>
#include <stdexcept>
#include <cmath>
#include <cassert>

Functions

unsigned int binomialInverseCDF (double cdf, unsigned int n, double p)
 

Function Documentation

◆ binomialInverseCDF()

unsigned int binomialInverseCDF ( double  cdf,
unsigned int  n,
double  p 
)

Evaluates the inverse CDF of the binomial distribution directly from the definition The calculation is done mostly in the log domain except for the final accumulation of the probabilities