RngStreams is a C implementation of a high-quality uniform random number
generator that supports multiple "independent" streams of uniform random
numbers.
The RngStreams library is written by Pierre L'Ecuyer and Richard Simard.
Example of usage
----------------
#include <stdio.h>
#include "RngStream.h"
int main (void)
{
double x;
int i;
RngStream gen;
/* get a stream */
gen = RngStream_CreateStream ("generator_1");
/* sample from generator */
for (i=0; i<10; i++) {
x = RngStream_RandU01 (gen);
printf ("%f\n", x );
}
return 0;
}
|