std::unifor...:operator()(3)

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

πŸ’– NAME πŸ’–

Hii bestie 🫢, welcome to the page for std::uniform_real_distribution::operator() from the C++ Standard Libary manual β€” title std::unifor...:operator()(3) (yes, the title is literally abbreviated with ..., and we are respecting the truncation πŸ’…). The NAME section is a lil echo chamber: std::uniform_real_distribution::operator() β€” std::uniform_real_distribution::operator(). That’s the name, periodt. ✨

🌸 Synopsis 🌸

Two overloads, both since C++11, both template-y. Here’s the exact signature situation:

template< class Generator >                                       (1)
(since C++11)
result_type operator()( Generator& g );

template< class Generator >                                       (2)
(since C++11)
result_type operator()( Generator& g, const param_type& params );

So like, what do they do? They generate random numbers that are distributed according to the associated probability function. The entropy is acquired by calling g.operator(). That’s the whole vibe: call the generator’s call operator for entropy πŸ”₯.

The first version uses the associated parameter set, the second version uses params. The associated parameter set is not modified β€” hands off, bestie, no touching 🫢.

πŸŽ€ Parameters πŸŽ€

  • g β€” a uniform random bit generator object
  • params β€” distribution parameter set to use instead of the associated one

πŸ¦‹ Type requirements πŸ¦‹

  • Generator must meet the requirements of UniformRandomBitGenerator.

⭐ Return value ⭐

The generated random number. That’s the tea β˜•οΈ.

πŸ”₯ Complexity πŸ”₯

Amortized constant number of invocations of g.operator(). That’s the exact complexity line, bestie β€” amortized constant, no chaos πŸ’….


That’s the page, bestie 🫢. Source/version energy: http://cppreference.com, dated 2024.06.10. Footer mentioned with love, not pasted: mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from