#include <misc/random.hh>
Public Member Functions | |
| barand (int n, double p) | |
| int | rand () const |
Protected Attributes | |
| const int | n_ |
| const double | m_ |
| const double | s_ |
gen must be a random function computing a pseudo-random double value following a standard normal distribution. Use nrand() or bmrand().
Usually approximating a binomial distribution using a normal distribution and is accurate only if n*p and n*(1-p) are greater than 5.
| spot::barand< gen >::barand | ( | int | n, | |
| double | p | |||
| ) | [inline] |
| int spot::barand< gen >::rand | ( | ) | const [inline] |
const int spot::barand< gen >::n_ [protected] |
const double spot::barand< gen >::m_ [protected] |
const double spot::barand< gen >::s_ [protected] |
1.5.2