| Revision: | 289 |
| Committed: | Thu Feb 27 18:47:45 2003 UTC (22 years, 8 months ago) by mmeineke |
| File size: | 598 byte(s) |
| Log Message: | added randomSPRNG.hpp to the package (oops, should have beenthere to begin with.) added ssdFF++.cpp to the makefile |
| # | User | Rev | Content |
|---|---|---|---|
| 1 | mmeineke | 289 | #ifndef __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 | |||
| 19 | protected: | ||
| 20 | int *thisStream; | ||
| 21 | int myStreamNumber; | ||
| 22 | int nSPRNGStreams; | ||
| 23 | static int nStreamsInitialized; | ||
| 24 | |||
| 25 | }; | ||
| 26 | |||
| 27 | |||
| 28 | class gaussianSPRNG : protected randomSPRNG{ | ||
| 29 | |||
| 30 | public: | ||
| 31 | gaussianSPRNG(int iseed):randomSPRNG(iseed){} | ||
| 32 | ~gaussianSPRNG(){} | ||
| 33 | |||
| 34 | double getGaussian(); | ||
| 35 | |||
| 36 | protected: | ||
| 37 | |||
| 38 | }; | ||
| 39 | |||
| 40 | |||
| 41 | |||
| 42 | #endif |