ls1-MarDyn
ls1-MarDyn molecular dynamics code
Random.h
1#ifndef RANDOM_H
2#define RANDOM_H
3
4// by Stefan Becker
5#include <cmath>
6
12class Random {
13public:
14 Random(int seed = 8624);
15 void init(int seed);
16
18 float rnd();
19
21 float uniformRandInRange(float a, float b) {
22 return a + rnd() * (b - a);
23 }
24
25 int getIX() {
26 return this->ix;
27 }
28
29 // by Stefan Becker
32 double gaussDeviate(double stdDeviation);
33
34private:
35 int ix, iy;
36 float am;
37};
38
39#endif
Definition: Random.h:12
double gaussDeviate(double stdDeviation)
Definition: Random.cpp:35
float rnd()
Definition: Random.cpp:14
float uniformRandInRange(float a, float b)
Definition: Random.h:21