|
DCMTK Version 3.7.1
OFFIS DICOM Toolkit
|
Public Member Functions | |
| OFRandom () | |
| default constructor, initializes the PRNG based on time(2) and clock(2). | |
| virtual | ~OFRandom () |
| destructor | |
| Uint64 | getRND64 () |
| return a random Uint64 value | |
| Uint32 | getRND32 () |
| return a random Uint32 value | |
| Uint16 | getRND16 () |
| return a random Uint16 value | |
| Uint8 | getRND8 () |
| return a random Uint8 value | |
| void | seed (Uint32 sval) |
| Re-seed the PRNG with the given parameter. | |
Private Member Functions | |
| void | isaac () |
| generate next round of random numbers. | |
| void | mixSeed () |
| mix the seed values and then generate the first round of random numbers. | |
Private Attributes | |
| Uint32 | randcnt |
| number of random bytes still available before isaac() needs to called again | |
| Uint32 | randrsl [OFRandom_SIZ] |
| random memory | |
| Uint32 | randmem [OFRandom_SIZ] |
| internal state of the PRNG | |
| Uint32 | randa |
| internal state of the PRNG | |
| Uint32 | randb |
| internal state of the PRNG | |
| Uint32 | randc |
| internal state of the PRNG | |
| Uint16 OFRandom::getRND16 | ( | ) |
return a random Uint16 value
| Uint32 OFRandom::getRND32 | ( | ) |
return a random Uint32 value
| Uint64 OFRandom::getRND64 | ( | ) |
return a random Uint64 value
| Uint8 OFRandom::getRND8 | ( | ) |
return a random Uint8 value
|
private |
generate next round of random numbers.
Calling this method will cause the algorithm to generate a new set of random numbers in randrsl.
| void OFRandom::seed | ( | Uint32 | sval | ) |
Re-seed the PRNG with the given parameter.
This method should only be used when a reproducible sequence of pseudo-random numbers is desired, e.g. in test routines.
| sval | seed value |