std::expone...::operator()(3)
π NAME π
std::exponential_distribution::operator() β std::exponential_distribution::operator()
This is the C++ Standard Libary manual, section 3, bestie. Yes, itβs the call operator for std::exponential_distribution, and the NAME line literally says it twice like itβs hyping itself up π
.
β¨ Synopsis β¨
okay so there are two overloads, and both have been around 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 );
Overload (1) uses the associated parameter set. Overload (2) uses params instead. The associated parameter set is not modified β hands off, no cap π«Ά.
It generates random numbers that are distributed according to the associated probability function. The entropy is acquired by calling g.operator().
π Parameters π
gβ a uniform random bit generator object.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, periodt.
πΈ Return value πΈ
The generated random number. Thatβs it, thatβs the tea β.
π Complexity π
Amortized constant number of invocations of g.operator(). Literally amortized constant, bestie β not a whole dramatic spiral.
Okay thatβs the whole page, mwah π β source: http://cppreference.com, version/date: 2024.06.10 π
π¦ 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