PseudoRandomSource Class Reference
this class serves as a source of reproducible (pseudo-)random numbers
More...
#include <PseudoRandomSource.h>
List of all members.
Detailed Description
To generate the random numbers, the linear congruetial method is used. 2^32 is used as modulus. The overflow in the implementation is intended (and controlled, as UWORD32 is used as datatype which always is 32 bits wide).
Constructor & Destructor Documentation
PseudoRandomSource::PseudoRandomSource |
( |
UWORD32 |
s |
) |
[inline] |
Member Function Documentation
get a pseudo-random value from {0,...,n-1}
- Parameters:
-
| n | the range of the random value to be returned |
- Returns:
- a number >= 0 and <= n - 1
After calling getValue, the next getValue call will use the next state of the random number generator (analogous to the C rand() function)
Member Data Documentation
The documentation for this class was generated from the following files: