#include <RandomGenerator.h>
Public Types | |
| enum | ENTROPY_TYPE { TRUE_RANDOM, PSEUDO_RANDOM, UNSPECIFIED_RANDOM } |
Public Member Functions | |
| RandomGenerator (ENTROPY_TYPE seedSource=PSEUDO_RANDOM) | |
| void | setEntropySource (ENTROPY_TYPE seedSource) |
| void | reset (void) |
| double | getDeviate (void) |
| int | getIntegerInRange (int low, int high) |
Private Member Functions | |
| void | _gatherEntropy () |
| void | _initialize (void) |
Private Attributes | |
| ENTROPY_TYPE | _seedSource |
| int | _idum |
| int | _idum2 |
| int | iy |
| int | iv [NTAB] |
| int | j |
| int | k |
| double | temp |
Static Private Attributes | |
| static const int | IM1 = 2147483563 |
| static const int | IM2 = 2147483399 |
| static const int | IMM1 = IM1-1 |
| static const int | IA1 = 40014 |
| static const int | IA2 = 40692 |
| static const int | IQ1 = 53668 |
| static const int | IQ2 = 52774 |
| static const int | IR1 = 12211 |
| static const int | IR2 = 3791 |
| static const int | NTAB = 32 |
| static const int | NDIV = 1+IMM1/NTAB |
| static const double | EPS = defined_EPS |
| static const double | RNMX = defined_RNMX |
| static const double | AM = 1.0/RandomGenerator::IM1 |
|
|
|
|
|
|
|
|
|
_initialize(): the random number generator. |
|
|
getDeviate(): Returns a number greater than or equal to 0.0 and less than 1.0 (*not* less than or equal): |
|
||||||||||||
|
getIntegerInRange(): Returns an integer in the range from low *inclusive* to high *inclusive*. |
|
|
|
|
|
setEntropySource() is used in the case that the constructor for the object had seedSource=UNSPECIFIED_RANDOM: |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1.4.4