std::extrem...::operator()(3)

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

πŸ’… NAME πŸ’…

okay so welcome to the std::extrem...::operator()(3) page from the C++ Standard Libary πŸ’… this one is all about std::extreme_value_distribution::operator() β€” and the NAME line is literally std::extreme_value_distribution::operator() - std::extreme_value_distribution::operator(). yes bestie, it said the same thing twice, and we are keeping it because facts are facts, periodt.


✨ Synopsis ✨

both overloads are template< class Generator > and both are since C++11 β€” vintage-ish but still slaying. here's the exact shape:

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

this 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.

version (1) uses the associated parameter set, and version (2) uses params. the associated parameter set is not modified β€” like, it stays exactly as it was, no cap 🫢.


🌸 Parameters 🌸

  • g β€” a uniform random bit generator object. that's your entropy source, iykyk.
  • 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 it has to pass, fr fr.

πŸ¦‹ Return value πŸ¦‹

the generated random number. that's it, that's the return πŸ’–.


πŸ”₯ Complexity πŸ”₯

amortized constant number of invocations of g.operator(). so like, constant-ish on average β€” the manpage says amortized constant, and we respect it πŸ‘‘.


source/version: http://cppreference.com Β· date: 2024.06.10 Β· page: std::extrem...::operator()(3) β€” mwah, that's the cute sign-off πŸ’‹βœ¨

πŸ“¦ where this page comes from