GLAMERDOC++
Gravitational Lensing Code Library
|
This is a class for generating random numbers. It simplifies and fool proofs initialization and allows for multiple independent series of numbers. More...
#include <utilities_slsim.h>
Public Member Functions | |
RandomNumbers_NR (long seed) | |
PosType | operator() (void) |
return a uniform random number between 0 and 1 | |
PosType | gauss () |
generates a Gaussian distributed number with unit variance by polar Box-Muller transform | |
int | poisson (double lam) |
long | getseed () |
total number of calls | |
Public Attributes | |
size_t | calls = 0 |
This is a class for generating random numbers. It simplifies and fool proofs initialization and allows for multiple independent series of numbers.
This version is based on NR ran2() and is provided only for backwards reproducibility. Use RandomNumbers class when possible.