std::weibul...::operator()(3)

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

πŸ’– std::weibull_distribution::operator() πŸ’–

okay bestie, welcome to the std::weibul...::operator()(3) page from the C++ Standard Libary manual. this is the whole vibe for std::weibull_distribution::operator() - std::weibull_distribution::operator(), and it is literally about making random numbers with the distribution's associated probability function. ✨


🌸 NAME 🌸

std::weibull_distribution::operator() - std::weibull_distribution::operator()

bestie, that's the name. iconic, a little repetitive, but iconic. πŸ’…


πŸŽ€ 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 the tea is: it generates random numbers that are distributed according to the associated probability function. the entropy is acquired by calling g.operator(). no cap. πŸ¦‹

the first version uses the associated parameter set, and the second version uses params. and listen β€” 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. that's the vibe check, and it has to pass, fr fr. πŸ’€

⭐ Return value ⭐

the generated random number. that's it, that's the gift. 🎁


πŸ”₯ Complexity πŸ”₯

amortized constant number of invocations of g.operator(). lowkey efficient, highkey slay. πŸ‘‘


and that's the page, bestie πŸ’– β€” sourced from http://cppreference.com, dated 2024.06.10, for std::weibul...::operator()(3). bye! πŸŒΈπŸ’…

πŸ“¦ where this page comes from