Random number generator related routines. More...
Go to the source code of this file.
Macros | |
| #define | M_PI acos(-1) |
| \(\pi\) if not defined elsewhere | |
Functions | |
| int | ranset (unsigned long *seed) |
| Seed the ranlux generator from GSL. | |
| int | Par_ranread (char *filename, double *ranval) |
| Reads ps from a file Since this function is very similar to Par_sread, I'm not really going to comment it check there if you are confused about things. | |
| int | Par_ranset (unsigned long *seed, int iread) |
| Uses the rank to get a new seed. Copying from the FORTRAN description here c create new seeds in range seed to 9*seed c having a range of 0*seed gave an unfortunate pattern c in the underlying value of ds(1) (it was always 10 times bigger c on the last processor). This does not appear to happen with 9. | |
| double | Par_granf () |
| Generates a random double which is then sent to the other ranks. | |
| int | Gauss_z (Complex *ps, unsigned int n, const Complex mu, const double sigma) |
| Generates a vector of normally distributed random double precision complex numbers using the Box-Muller Method. | |
| int | Gauss_c (Complex_f *ps, unsigned int n, const Complex_f mu, const float sigma) |
| Generates a vector of normally distributed random single precision complex numbers using the Box-Muller Method. | |
| int | Gauss_d (double *ps, unsigned int n, const double mu, const double sigma) |
| Generates a vector of normally distributed random double precision numbers using the Box-Muller Method. | |
| int | Gauss_f (float *ps, unsigned int n, const float mu, const float sigma) |
| Generates a vector of normally distributed random single precision numbers using the Box-Muller Method. | |
Variables | |
| gsl_rng * | ranlux_instd |
| RANLUX instance. | |
| unsigned long | seed |
| RANLUX seed. | |
Random number generator related routines.
Definition in file random.c.