Medial Code Documentation
|
Linear congruential generator. More...
#include <helpers.h>
Public Types | |
using | result_type = StateType |
Public Member Functions | |
SimpleLCG (SimpleLCG const &that)=default | |
SimpleLCG (SimpleLCG &&that)=default | |
void | Seed (StateType seed) |
SimpleLCG (StateType state) | |
Initialize SimpleLCG. | |
StateType | operator() () |
StateType | Min () const |
StateType | Max () const |
Static Public Member Functions | |
constexpr static result_type | min () |
constexpr static result_type | max () |
Linear congruential generator.
The distribution defined in std is not portable. Given the same seed, it migth produce different outputs on different platforms or with different compilers. The SimpleLCG implemented here is to make sure all tests are reproducible.
|
inlineexplicit |