Lumiera  0.pre.03
»edit your freedom«
Random_test Class Reference

Description

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.

Private Member Functions

virtual void run (Arg)
 
void simpleUsage ()
 
void verify_distributionVariants ()
 
void verify_reproducibleSequence ()
 

Member Function Documentation

◆ simpleUsage()

void simpleUsage ( )
inlineprivate
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().

+ Here is the call graph for this function:

◆ 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().

+ Here is the call graph for this function:

◆ 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().

+ Here is the call graph for this function:
+ Inheritance diagram for Random_test:
+ Collaboration diagram for Random_test:

The documentation for this class was generated from the following file: