Go to the documentation of this file.
22 #ifndef SPOT_MISC_RANDOM_HH
23 # define SPOT_MISC_RANDOM_HH
36 void srand(
unsigned int seed);
42 int rrand(
int min,
int max);
82 template<
double (*gen)()>
87 :
n_(n),
m_(n * p),
s_(sqrt(n * p * (1 - p)))
98 double x = gen() *
s_ +
m_;
101 res =
static_cast<int> (x);
121 #endif // SPOT_MISC_RANDOM_HH
Please comment this page and report errors about it on
the RefDocComments page.
Generated on Mon Jul 2 2012 17:35:47 for spot by
1.8.1.1