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 Sat Oct 27 2012 09:34:32 for spot by
1.8.1.2