MixMaxRandom¶
-
class MixMaxRandom¶
Reproducible random number stream backed by the MIXMAX generator [1].
Used wherever madspace needs a CPU-side RNG stream outside the compute graph, for example while completing LHE events; see LHECompleter::complete_event_data. A DerivedSeed keys the stream to a specific call site so independent streams stay reproducible under a single top-level run seed.
References
[1] K. Savvidy, “The MIXMAX random number generator”, Comput. Phys. Commun. 196 (2015) 161, https://doi.org/10.1016/j.cpc.2015.06.003
Public Functions
-
inline MixMaxRandom()¶
Non-deterministically seeded stream.
-
inline MixMaxRandom(DerivedSeed seed)¶
- Parameters:
seed – The derived seed to start the stream from.
-
inline explicit MixMaxRandom(std::uint64_t seed)¶
Stream seeded directly from a raw 64-bit value.
-
inline void set_seed(DerivedSeed seed)¶
Re-seed the stream; see the DerivedSeed constructor.
-
inline double generate_double()¶
Draw a uniform value in
[0, 1).
-
inline std::size_t generate_int(std::size_t max_int)¶
Draw a uniform integer in
[0, max_int).