std::mersen...ine::discard(3)
Okay bestie, this is the std::mersenne_twister_engine::discard page from the C++ Standard Libary manual π
β¨
π NAME π
std::mersenne_twister_engine::discardβstd::mersenne_twister_engine::discard
πΈ Synopsis πΈ
void discard( unsigned long long z );
Since C++11, bestie β it's been iconic since then π
It advances the internal state by z times. Equivalent to calling operator() z times and discarding the result. Periodt.
π Parameters π
zβ integer value specifying the number of times to advance the state by
π«Ά Return value π«Ά
(none) β literally no return value, bestie. It's giving void energy π
π₯ Complexity π₯
No worse than the complexity of z consecutive calls to operator().
π Notes π
For some engines, "fast jump" algorithms are known, which advance the state by many steps (order of millions) without calculating intermediate state transitions, although not necessarily in constant time. So the vibe is: big jumps may be possible for some engines, but do not assume constant time, iykyk.
π See also π
operator()β advances the engine's state and returns the generated value (C++11) (public member function)
πΈ source: http://cppreference.com β’ date/version: 2024.06.10 β’ footer page tag: std::mersen...ine::discard(3) β bye bestie, slay those state advances π
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms