![]() |
Raven Engine v0.1
|
Random number generation and entropy tools. More...
Classes | |
| class | Crux::Random |
| Static wrapper around RandomEngine for convenience. More... | |
| class | Crux::RandomEngine |
| High-performance 64-bit state, 32-bit output PRNG based on PCG32. More... | |
Functions | |
| std::pair< unsigned long long, unsigned long long > | Crux::Entropy::GetSeedPair () noexcept |
| Retrieves a seed pair for random number generation. | |
| void | Crux::Entropy::ForceSeed (unsigned long long state, unsigned long long seq) noexcept |
| Overrides entropy generation with a forced seed pair. | |
| void | Crux::Entropy::ClearForcedSeed () |
| Clears any previously forced seed, restoring normal entropy behavior. | |
Random number generation and entropy tools.
Encapsulates RNG engines, entropy sources, and distribution logic.
| void Crux::Entropy::ClearForcedSeed | ( | ) |
Clears any previously forced seed, restoring normal entropy behavior.
After calling this, GetSeedPair will resume fetching entropy from system or fallback sources. Useful to reset after deterministic testing scenarios.
|
noexcept |
Overrides entropy generation with a forced seed pair.
Useful for deterministic behavior in testing or debugging scenarios. Once set, subsequent calls to GetSeedPair will return the forced values until the application resets or explicitly clears them.
| state | The internal state seed value. |
| seq | The stream sequence seed value. |
|
noexcept |
Retrieves a seed pair for random number generation.
This function attempts to obtain a pair of 64-bit values to be used as the initial state and stream sequence for deterministic random number engines.
The seed source priority is as follows: