- Test:
- demonstrate simple access to random number generation, as well as the setup of controlled random number sequences.
- See also
- random.hpp
Definition at line 35 of file random-test.cpp.
◆ simpleUsage()
- Test:
- demonstrate usage of default random number generators.
- Note
- should draw a seed once per Test instance
Definition at line 51 of file random-test.cpp.
References lib::rani().
◆ verify_distributionVariants()
void verify_distributionVariants |
( |
| ) |
|
|
inlineprivate |
- Test:
- properties of predefined distributions provided for convenience
- the upper bound for
rani(bound)
is exclusive
- uniform distributions are sufficiently uniform
- spread of normal distribution is within expected scale
Definition at line 70 of file random-test.cpp.
References lib::rani().
◆ verify_reproducibleSequence()
void verify_reproducibleSequence |
( |
| ) |
|
|
inlineprivate |
- Test:
- demonstrate that random number sequences can be reproduced
- use a rigged SeedNucleus, always returning a fixed sees
- build two distinct random sequence generators, yet seeded from the same source; they will produce the same sequence
- sequences can be re-shuffled by a seed value, so that the following random numbers will start to differ
- but even this re-shuffling is deterministic
Definition at line 107 of file random-test.cpp.
References RandomSequencer< GEN >::i32(), and RandomSequencer< GEN >::reseed().
The documentation for this class was generated from the following file: