STD::EXPONENTIAL_DISTRIBUTION(3)

hey bestie! πŸ’– welcome to the Library Functions Manual ✨ this page is all about std::expon...RealType >(3) β€” aka std::exponential_distribution< _RealType > β€” and she's giving random numbers, exponential style. no cap. πŸ¦‹


🌸 NAME 🌸

std::exponential_distribution< _RealType > β€” An exponential continuous distribution for random numbers. πŸ’…


πŸŽ€ 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 parameter 1.0. ✨
  • exponential_distribution (_RealType __lambda) β€” Constructs an exponential distribution with inverse scale parameter $bda$. πŸ’œ
  • exponential_distribution (const param_type &__p)
       template<typename _ForwardIterator, typename
           _UniformRandomNumberGenerator> void __generate (_ForwardIterator
           __f, _ForwardIterator __t, _UniformRandomNumberGenerator &__urng)
       template<typename _ForwardIterator, typename
           _UniformRandomNumberGenerator> void __generate (_ForwardIterator
           __f, _ForwardIterator __t, _UniformRandomNumberGenerator &__urng,
           const param_type &__p)
       template<typename _UniformRandomNumberGenerator> void __generate
           (result_type *__f, result_type *__t, _UniformRandomNumberGenerator
           &__urng, const param_type &__p)
  • _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)
  • 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 πŸ’–

   template<typename _RealType = double>
       class std::exponential_distribution< _RealType >"An exponential
       continuous distribution for random numbers.

The formula for the exponential probability density function is

       $p(x|bda) = bda e^{-bda x}$.
       Mean$ac{1}{bda}$Median$ac{}}bda}$Mode$zero$Range$[0, infty]$Standard
       Deviation$ac{1}{bda}$

Since

C++11 ✨


🌈 Member Typedef Documentation 🌈

   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. πŸ”₯

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. πŸ‘‘

Referenced by 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. 🫢


   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. ✨


okay bestie, that's the whole page! πŸ’– this was generated automatically by Doxygen for libstdc++ from the source code, and the footer tag was libstdc++ std::expon...RealType >(3) β€” no date on this one, just vibes. bye! πŸŽ€βœ¨

πŸ“¦ where this page comes from
  • arch rolling: gcc 16.2.1+r23+gd564253eb6c8-1 Β· GPL-3.0-or-later WITH GCC-exception-3.1 AND GFDL-1.3-or-later
  • fedora 43: libstdc++-docs 15.2.1-2.fc43 Β· GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel
  • fedora 43: libstdc++-docs 15.3.1-1.fc43 Β· GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel
  • fedora 44: libstdc++-docs 16.0.1-0.10.fc44 Β· GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel
  • fedora 44: libstdc++-docs 16.2.1-2.fc44
  • fedora 44: libstdc++-docs 16.2.1-3.fc44 Β· GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms