std::discre...:operator()(3)
π NAME π
std::discrete_distribution::operator() - std::discrete_distribution::operator()
okay bestie, this is the page for std::discrete_distribution::operator(), filed under the C++ Standard Libary manual (yes, that spelling is exactly what the page says, no cap π
). We're about to generate random numbers with the associated probability function, and the vibes are immaculate.
π¦ 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 this overload set generates random numbers that are distributed according to the associated probability function. 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 β hands off, bestie, it stays cute and untouched. π«Ά
πΈ Parameters πΈ
gβ a uniform random bit generator object. that's the generator, babe.paramsβ distribution parameter set to use instead of the associated one.
π Type requirements π
Generatormust meet the requirements ofUniformRandomBitGenerator.
β Return value β
The generated random number. that's it, that's the result, periodt.
π₯ Complexity π₯
Amortized constant number of invocations of g.operator(). iconic behavior fr fr.
mwah π source/version: http://cppreference.com β’ date: 2024.06.10 β’ page: std::discre...:operator()(3).
π¦ 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