source/Random.h
/**
     * Generate a random variable drawn from a Poisson distribution.
     **/
Generate a random variable drawn from a Poisson distribution.
Generate a random variable drawn from a Poisson distribution .
inline uint32_t GetRandPoisson(const double n, double p) {
      if (p > .5) return (uint32_t)n - GetRandPoisson(n * (1 - p));
      else return GetRandPoisson(n * p);
    }
inline uint32_t GetRandPoisson ( const double n , double p ) { if ( p > .5 ) return ( uint32_t ) n - GetRandPoisson ( n * ( 1 - p ) ) ; else return GetRandPoisson ( n * p ) ; }
Generate a random variable drawn from a Poisson distribution.
Generate a random variable drawn from a Poisson distribution .
// Optimizes for speed and calculability using symetry of the distribution