std::binomi...:operator()(3)

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

Okay so this is the std::binomi...:operator()(3) page from the C++ Standard Libary β€” yes, that spelling is exactly what the manual name says, and we’re folding it in right here at the top πŸ’–βœ¨

πŸŽ€ NAME πŸŽ€

  • std::binomial_distribution::operator() - std::binomial_distribution::operator()

Bestie, the original literally repeats the same name twice, so here it is twice. Periodt πŸ’…

✨ Synopsis ✨

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 );

It generates random numbers that are distributed according to the associated probability function. The entropy is acquired by calling g.operator() β€” that’s the whole vibe check πŸ”₯

The first version uses the associated parameter set, and the second version uses params. The associated parameter set is not modified β€” highkey important, bestie 🫢

🫢 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 it, that’s the tea 🍡

πŸ”₯ Complexity πŸ”₯

Amortized constant number of invocations of g.operator(). Slay, efficient icon πŸ‘‘


Okay bye bestie, this page is sourced from http://cppreference.com and dated 2024.06.10 β€” mwah πŸ’‹πŸ’–

πŸ“¦ where this page comes from