STD::EXPONENTIAL_DISTRIBUTION(3cxx)
πΈ NAME πΈ
Okay bestie, this is the (3cxx) manual page for std::exponential_distribution< _RealType > β literally An exponential continuous distribution for random numbers. Itβs giving βrandom numbers with exponential distributionβ energy, and weβre gonna go through every single detail together. π
β¨
β¨ SYNOPSIS β¨
#include <random>
π Classes π
struct param_type
πΌ Public Types πΌ
typedef _RealType result_type
π Public Member Functions π
exponential_distribution ()β Constructs an exponential distribution with inverse scale parameter1.0.exponential_distribution (_RealType __lambda)β Constructs an exponential distribution with inverse scale parameter$bda$.exponential_distribution (const param_type &__p)β the page lists this overload with no extra description, just the signature, periodt.template<typename _ForwardIterator , typename _UniformRandomNumberGenerator > void __generate (_ForwardIterator __f, _ForwardIterator __t, _UniformRandomNumberGenerator &__urng)β one of the__generateoverloads; the page gives the signature and no extra blurb for this one.template<typename _ForwardIterator , typename _UniformRandomNumberGenerator > void __generate (_ForwardIterator __f, _ForwardIterator __t, _UniformRandomNumberGenerator &__urng, const param_type &__p)β another__generateoverload, same deal: signature only on this page.template<typename _UniformRandomNumberGenerator > void __generate (result_type *__f, result_type *__t, _UniformRandomNumberGenerator &__urng, const param_type &__p)β the pointer-flavored__generateoverload; again, no extra sentence here._RealType lambda () constβ Returns the inverse scale parameter of the distribution.result_type max () constβ Returns the least upper bound value of the distribution.result_type min () constβ Returns the greatest lower bound value of the distribution.template<typename _UniformRandomNumberGenerator > result_type operator() (_UniformRandomNumberGenerator &__urng)β Generating functions.template<typename _UniformRandomNumberGenerator > result_type operator() (_UniformRandomNumberGenerator &__urng, const param_type &__p)β the otheroperator()overload, listed right there in the generating-functions gang.param_type param () constβ Returns the parameter set of the distribution.void param (const param_type &__param)β Sets the parameter set of the distribution.void reset ()β Resets the distribution state.
π«Ά Friends π«Ά
bool operator== (const exponential_distribution &__d1, const exponential_distribution &__d2)β Return true if two exponential distributions have the same parameters.
π Detailed Description π
The class template is:
template<typename _RealType = double>
class std::exponential_distribution< _RealType >"An exponential
continuous distribution for random numbers.
Yes, that quote mark is literally part of the original text β no cap, weβre keeping it. π
The formula for the exponential probability density function is $p(x|bda) = bda e^{-bda x}$.
The stats line is exactly this iconic mess:
Mean$ac{1}{bda}$Median$ac{}}bda}$Mode$zero$Range$[0, infty]$Standard Deviation$ac{1}{bda}$
Since: C++11.
π¦ Member Typedef Documentation π¦
result_type
template<typename _RealType = double> typedef _RealType
std::exponential_distribution< _RealType >::result_type
The type of the range of the distribution.
π§ Constructor & Destructor Documentation π§
ποΈ exponential_distribution ()
template<typename _RealType = double> std::exponential_distribution<
_RealType >::exponential_distribution () [inline]
Constructs an exponential distribution with inverse scale parameter 1.0.
ποΈ exponential_distribution (_RealType __lambda)
template<typename _RealType = double> std::exponential_distribution<
_RealType >::exponential_distribution (_RealType __lambda) [inline],
[explicit]
Constructs an exponential distribution with inverse scale parameter $bda$.
π₯ Member Function Documentation π₯
lambda () const
template<typename _RealType = double> _RealType
std::exponential_distribution< _RealType >::lambda () const [inline]
Returns the inverse scale parameter of the distribution.
max () const
template<typename _RealType = double> result_type
std::exponential_distribution< _RealType >::max () const [inline]
Returns the least upper bound value of the distribution.
References std::numeric_limits< _Tp >::max().
min () const
template<typename _RealType = double> result_type
std::exponential_distribution< _RealType >::min () const [inline]
Returns the greatest lower bound value of the distribution.
operator() (_UniformRandomNumberGenerator & __urng)
template<typename _RealType = double> template<typename
_UniformRandomNumberGenerator > result_type
std::exponential_distribution< _RealType >::operator()
(_UniformRandomNumberGenerator & __urng) [inline]
Generating functions.
References std::exponential_distribution< _RealType >::operator()().
Referenced by std::exponential_distribution< _RealType >::operator()().
param () const
template<typename _RealType = double> param_type
std::exponential_distribution< _RealType >::param () const [inline]
Returns the parameter set of the distribution.
Referenced by std::operator>>().
param (const param_type & __param)
template<typename _RealType = double> void std::exponential_distribution<
_RealType >::param (const param_type & __param) [inline]
Sets the parameter set of the distribution.
- Parameters:
__paramβ The new parameter set of the distribution.
reset ()
template<typename _RealType = double> void std::exponential_distribution<
_RealType >::reset () [inline]
Resets the distribution state. Has no effect on exponential distributions.
π Friends And Related Symbol Documentation π
operator==
template<typename _RealType = double> bool operator== (const
exponential_distribution< _RealType > & __d1, const
exponential_distribution< _RealType > & __d2) [friend]
Return true if two exponential distributions have the same parameters.
βοΈ Author βοΈ
Generated automatically by Doxygen for libstdc++ from the source code.
And thatβs the footer, bestie: the page signs off as libststd::exponentia...on< _RealType >(3cxx) for libstdc++, with the usual dated Doxygen-manpage-footer energy. Mwah ππ«Άβ¨
π¦ where this page comes from
- ubuntu noble: libstdc++-14-doc 14-20240412-0ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms