Public Types | |
| using | result_type = MatlabMT19937::result_type |
Public Member Functions | |
| result_type | operator() () |
| double | genRes53 () |
| MATLAB-canonical 53-bit double in [0, 1) — what rand uses. | |
| void | seed (std::uint64_t seed) |
| Seed the stream. seed == 0 ≡ rng('default'). | |
| void | shuffle () |
| rng('shuffle') — seed from a nondeterministic source. | |
| Value | state (std::pmr::memory_resource *mr=nullptr) const |
| s = rng() — capture the stream state as a struct (.Type / .State). | |
| void | restore (const Value &s) |
| rng(s) — restore a state struct captured by state(). | |
| void | setLegacyV4 (std::uint64_t seed) |
| std::uint64_t | legacySeed () const noexcept |
| rand('seed') / randn('seed') — query the last legacy seed. | |
| bool | legacyV4 () const noexcept |
| double | v4Uniform () |
| double | v4Normal () |
| MatlabMT19937 & | engine () noexcept |
| Escape hatch: the underlying MT19937 (e.g. for getState/setState). | |
| const MatlabMT19937 & | engine () const noexcept |
Static Public Member Functions | |
| static constexpr result_type | min () |
| static constexpr result_type | max () |
Definition at line 28 of file rng_context.hpp.
| using nk::ops::RngContext::result_type = MatlabMT19937::result_type |
Definition at line 33 of file rng_context.hpp.
|
inlinenoexcept |
Definition at line 90 of file rng_context.hpp.
|
inlinenoexcept |
Escape hatch: the underlying MT19937 (e.g. for getState/setState).
Definition at line 89 of file rng_context.hpp.
|
inline |
MATLAB-canonical 53-bit double in [0, 1) — what rand uses.
Definition at line 39 of file rng_context.hpp.
|
inlinenoexcept |
rand('seed') / randn('seed') — query the last legacy seed.
Definition at line 70 of file rng_context.hpp.
|
inlinenoexcept |
Definition at line 71 of file rng_context.hpp.
|
inlinestaticconstexpr |
Definition at line 35 of file rng_context.hpp.
|
inlinestaticconstexpr |
Definition at line 34 of file rng_context.hpp.
|
inline |
Definition at line 36 of file rng_context.hpp.
|
inline |
Seed the stream. seed == 0 ≡ rng('default').
Definition at line 43 of file rng_context.hpp.
|
inline |
Definition at line 63 of file rng_context.hpp.
|
inline |
Definition at line 77 of file rng_context.hpp.
|
inline |
Definition at line 72 of file rng_context.hpp.