See also file common/rand.h
Measuring the time consumption of program sections are often of great interest. The Stxxl comes with several build-in pseudo random number generators as shown below:
unsigned int random32 = rand32();
double urandom_slow = urand_slow();
double urandom_fast = urand_fast();
unsigned int n_random = n_rand(123456789);
STXXL_MSG(
"random 32 bit number: " << random32);
STXXL_MSG(
"random 64 bit number: " << random64);
STXXL_MSG(
"random number between [0.0, 1.0) (slow): " << urandom_slow);
STXXL_MSG(
"random number between [0.0, 1.0) (fast): " << urandom_fast);
STXXL_MSG(
"random number between [0,123456789): " << n_random);