std::negati...::operator()(3)
Hey bestie π welcome to the std::negative_binomial_distribution::operator() page β itβs the C++ Standard Libary manual page std::negati...::operator()(3) (yes, the header spells it βLibary,β iconic π). Buckle up, itβs giving random-number generator realness β¨
π NAME π
std::negative_binomial_distribution::operator() β literally the operator() of std::negative_binomial_distribution. Thatβs the whole name, no cap.
β¨ Synopsis β¨
Two overloads, both since C++11 π:
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 );
What do they do? They generate 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, the second version uses params. The associated parameter set is not modified. Periodt.
π Parameters π
gβ a uniform random bit generator objectparamsβ 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 π«Ά
πΈ Return value πΈ
The generated random number. Slay.
π₯ Complexity π₯
Amortized constant number of invocations of g.operator(). So like, on average, itβs not doing the most.
Thatβs the whole page, bestie π Source/version: http://cppreference.com, dated 2024.06.10 β mwah π
π¦ 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