std::subtra...ne::discard(3)
π NAME
std::subtract_with_carry_engine::discard β okay so this is the discard member of std::subtract_with_carry_engine, and the page is literally titled std::subtract_with_carry_engine::discard twice because man pages are dramatic like that π
this one comes straight from the C++ Standard Libary (their spelling, not mine π
).
β¨ Synopsis β¨
void discard( unsigned long long z ); (since C++11)
Advances the internal state by z times. Equivalent to calling operator() z times and discarding the result. No cap, that's the whole vibe: skip ahead by z, throw away what you skipped over π«Ά
π Parameters π
zβ integer value specifying the number of times to advance the state by.
π Return value π
(none) β literally nothing comes back, bestie. It just quietly moves the state along π
π₯ Complexity π₯
No worse than the complexity of z consecutive calls to operator().
π¦ Notes π¦
For some engines, <rainbow>"fast jump"</rainbow> 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 yeah β big leap energy, but don't assume it's always constant-time, iykyk π
π See also π
operator()β advances the engine's state and returns the generated value(C++11)(public member function).
shoutout to http://cppreference.com, version 2024.06.10, and the footer that says std::subtra...ne::discard(3) β bye bestie, go discard something responsibly π«Άπ
π¦ 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