43 int t=(int)time(
nullptr);
50 executeBoxMuller =
true;
62 return y[0] * sigma + u;
66 executeBoxMuller =
true;
67 return y[1] * sigma + u;
71void RandnScalar::boxMuller()
81 w = x1 * x1 + x2 * x2;
84 w = sqrt( (-2.0 * log( w ) ) / w );
RandScalar * implementation(void *t)
contains the definition of a Vector type
A random number generator, uniform in the range 0-1.
void init()
Initialize the random generator using current time (time(0)).
double get()
Generate a random number from a uniform distribution.
double get(double u=0.0, double sigma=1.0)
Generate a randomly generated number, drawn from a normal distribution.
RandnScalar()
Constructor.
void init()
Initialize the generator.