ls1-MarDyn
ls1-MarDyn molecular dynamics code
|
#include <Random.h>
Public Member Functions | |
Random (int seed=8624) | |
void | init (int seed) |
float | rnd () |
float | uniformRandInRange (float a, float b) |
int | getIX () |
double | gaussDeviate (double stdDeviation) |
Uniform (quasi)-random number generator class.
Minimal random number generator of Park and Miller combinmed with a Marsaglia shift sequence. (see Numerical Recipies in Fortran 90: The Art of Parallel Scientific Computing, Chapter B7)
double Random::gaussDeviate | ( | double | stdDeviation | ) |
returns a gaussian distributed deviate with zero mean and a standard deviation of stdDeviation the returned value is in the range +/- infinity (better: smallest, largest double number)
Method generates a gaussian distributed deviate with mean = 0 and the specified standard deviation borrowed from "Numerical Recipes in C++" by W.H. Press et al., Cambridge University Press
float Random::rnd | ( | ) |
Produces a random number between zero and one.
|
inline |
get a uniformly distributed random number in [a,b]