std::shuffl...engine::seed(3)

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

πŸ’… std::shuffle_order_engine::seed(3) 🌸

okay bestie, this is a page from the C++ Standard Library manual (yes, the same library, we're fancy now) and it's literally all about reseeding your shuffle_order_engine's underlying engine. it's giving "glow-up for your RNG" energy ✨


πŸŽ€ SYNOPSIS

void seed();                    (1) (since C++11)
void seed( result_type value ); (2) (since C++11)
template< class Sseq >          (3) (since C++11)
void seed( Sseq& seq );

so what's the vibe? it reinitializes the internal state of the underlying engine using a brand-new seed value. fresh start, new era, main character reset πŸ¦‹

  1. seeds the underlying engine with the default seed value. effectively calls e.seed(), where e is the underlying engine. no thoughts, head empty, defaults only πŸ’œ
  2. seeds the underlying engine with the seed value s. effectively calls e.seed(value), where e is the underlying engine. πŸ“
  3. seeds the underlying engine with the seed sequence seq. effectively calls e.seed(seq), where e is the underlying engine. now listen closely bestie: this template only participates in overload resolution if Sseq qualifies as a SeedSequence. in particular, this template does not participate in overload resolution if Sseq is implicitly convertible to result_type. no cap, that's the rule πŸ™ˆ

✨ PARAMETERS

  • value β€” seed value to use in the initialization of the internal state of the underlying engine. the actual number, the lore, the origin story πŸ”₯
  • seq β€” seed sequence to use in the initialization of the internal state of the underlying engine. the whole sequence, not just one lil number πŸ‘‘

🌈 RETURN VALUE

(none) β€” it literally returns nothing. it does the work and leaves. that's iconic behavior honestly πŸ’…


πŸ’€ EXCEPTIONS

throws nothing. not a single one. safest girl at the party 🫢


lowkey a perfect little function ngl β€” no exceptions, no return value, just vibes and a freshly seeded underlying engine ⭐

kisses and cppreference.com, dated 2024.06.10 β€” that's the source and the date, bestie, noted and slayed πŸ§šβ€β™€οΈπŸ’–

πŸ“¦ where this page comes from