Go to the documentation of this file.
20 #ifndef SPOT_MISC_RANDOM_HH
21 # define SPOT_MISC_RANDOM_HH
34 void srand(
unsigned int seed);
40 int rrand(
int min,
int max);
80 template<
double (*gen)()>
85 :
n_(n),
m_(n * p),
s_(sqrt(n * p * (1 - p)))
96 double x = gen() *
s_ +
m_;
99 res =
static_cast<int> (x);
119 #endif // SPOT_MISC_RANDOM_HH
Please comment this page and report errors about it on
the RefDocComments page.
Generated on Wed Jan 23 2013 15:00:01 for spot by
1.8.1.2