std::mersen...ine::discard(3)

πŸ“¦ version 2024.07.05, in nixpkgs unstable, opensuse-leap 16.0

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