2 #include <gsl/gsl_rng.h>
3 #include <gsl/gsl_randist.h>
8 const gsl_rng_type * T;
14 /* create a generator chosen by the
15 environment variable GSL_RNG_TYPE */
20 r = gsl_rng_alloc (T);
22 /* print n random variates chosen from
23 the poisson distribution with mean
26 for (i = 0; i < n; i++)
28 unsigned int k = gsl_ran_poisson (r, mu);