std::extrem...::operator()(3)
π 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 π
Generatormust meet the requirements ofUniformRandomBitGenerator. 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
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms