std::poisso...::operator()(3)

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

okay so bestie, we're on the std::poisso...::operator()(3) page, and the manual name is C++ Standard Libary (yes, that's the spelling here 😭). It's giving C++ random-number realness, and honestly it's not scary β€” here's the whole vibe check πŸ’–


πŸŽ€ NAME πŸŽ€

  • std::poisson_distribution::operator() - std::poisson_distribution::operator()

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

So there are two versions, both since C++11 ✨. They generate random numbers that are distributed according to the associated probability function, and the entropy is acquired by calling g.operator().

The first version uses the associated parameter set, and the second version uses params. The associated parameter set is not modified β€” periodt πŸ’…

🌸 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(). Translation: no whole saga of calls per number, bestie β€” amortized constant, periodt ✨


mwah πŸ’‹ source is http://cppreference.com, date/version stamp is 2024.06.10, and the page is std::poisso...::operator()(3). bye bestie, go be iconic with your random numbers 🫢✨

πŸ“¦ where this page comes from