ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/mdtools/headers/randomSPRNG.hpp
Revision: 221
Committed: Thu Jan 2 20:14:08 2003 UTC (22 years, 4 months ago) by chuckv
File size: 625 byte(s)
Log Message:
Thermo now can use SPRNG or rand48 (if not MPI).
Finished up work on randomSPRNG. Still need to fix
access to MPISimulation.

File Contents

# Content
1 #idndef __randomSPRNG_H
2 #define __randomSPRNG_H
3
4 /* Define the random number generator used by SPRNG
5 to be type 3 = Combined Multiple Recursive Generator.
6 */
7 #define GTYPE 3
8 #ifdef IS_MPI
9 #define USE_MPI
10 #endif
11
12 class randomSPRNG{
13 public:
14 randomSPRNG(int myseed);
15 ~randomSPRNG();
16
17 double getRandom();
18 private:
19 int *thisStream;
20 int myStreamNumber;
21 int nSPRNGStreams;
22 static int nStreamsInitialized;
23
24 }
25
26
27 class gaussianSPRNG : public randomSPRNG{
28 public:
29 gaussianSPRNG();
30 ~gaussianSPRNG();
31
32 double getGaussian();
33 private:
34 using randomSPRNG::getRandom;
35 double getRandom() { getRandom(); }
36 }
37
38
39
40 #endif