STD::CAUCHY_DISTRIBUTION(3cxx)

okay so bestie, welcome to the 3cxx manual page for std::cauchy_distribution< _RealType > β€” yes it's a whole libstdc++ situation and we're gonna get through it together, no cap πŸ’…βœ¨

🌸 NAME 🌸

std::cauchy_distribution< _RealType > β€” literally a cauchy_distribution random number distribution. that's the whole name, she's concise, we respect it πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

you pull her in with:

#include <random

wait, bestie, the actual include is exactly this:

#include <random>

πŸŽ€ Classes

  • struct param_type β€” the parameter struct, sitting there in the synopsis with no extra blurb. mysterious. iconic.

🌸 Public Types

  • typedef _RealType result_type β€” listed here with no extra note; the full description is down in its own section, keep scrolling 🫢

πŸ’… Public Member Functions

here's the whole roster, no skips, no cuts:

  • cauchy_distribution (_RealType __a, _RealType __b=1.0) β€” the manual just drops the signature, no little description attached.
  • cauchy_distribution (const param_type &__p) β€” same vibe, signature only.
  • template<typename _ForwardIterator , typename _UniformRandomNumberGenerator > void __generate (_ForwardIterator __f, _ForwardIterator __t, _UniformRandomNumberGenerator &__urng) β€” no extra blurb in the roster.
  • template<typename _ForwardIterator , typename _UniformRandomNumberGenerator > void __generate (_ForwardIterator __f, _ForwardIterator __t, _UniformRandomNumberGenerator &__urng, const param_type &__p) β€” still no extra blurb.
  • template<typename _UniformRandomNumberGenerator > void __generate (result_type *__f, result_type *__t, _UniformRandomNumberGenerator &__urng, const param_type &__p) β€” signature only, she's mysterious.
  • _RealType a () const β€” no description in the roster, just vibes.
  • _RealType b () const β€” same, no description attached.
  • 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) β€” no extra blurb in the roster.
  • 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 cauchy_distribution &__d1, const cauchy_distribution &__d2) β€” Return true if two Cauchy distributions have the same parameters.

πŸ’– Detailed Description πŸ’–

the class line is exactly this:

template<typename _RealType = double>
    class std::cauchy_distribution< _RealType >

and then the manual says:

A cauchy_distribution random number distribution.

The formula for the normal probability mass function is:

$p(x|a,b) = (i b (1 + (ac{x-a}{b})^2))^{-1}$

and the Since note is:

  • Since β€” C++11

🧚 Member Typedef Documentation

⭐ result_type

template<typename _RealType  = double> typedef _RealType std::cauchy_distribution< _RealType >::result_type

The type of the range of the distribution. she said what she said πŸ’…


πŸ”₯ Member Function Documentation

🌟 max()

template<typename _RealType  = double> result_type std::cauchy_distribution< _RealType >::max () const [inline]

Returns the least upper bound value of the distribution.

References std::numeric_limits< _Tp >::max().

🌟 min()

template<typename _RealType  = double> result_type std::cauchy_distribution< _RealType >::min () const [inline]

Returns the greatest lower bound value of the distribution.

References std::numeric_limits< _Tp >::lowest().

🌟 operator()

template<typename _RealType  = double> template<typename _UniformRandomNumberGenerator > result_type std::cauchy_distribution< _RealType >::operator() (_UniformRandomNumberGenerator & __urng) [inline]

Generating functions.

References std::cauchy_distribution< _RealType >::operator()().

Referenced by std::cauchy_distribution< _RealType >::operator()().

the manual literally says it references and is referenced by itself, and honestly? main character energy. we are not questioning the icon 🫢

🌟 param() const

template<typename _RealType  = double> param_type std::cauchy_distribution< _RealType >::param () const [inline]

Returns the parameter set of the distribution.

Referenced by std::operator>>().

🌟 param() setter

template<typename _RealType  = double> void std::cauchy_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::cauchy_distribution< _RealType >::reset () [inline]

Resets the distribution state.


πŸ’« operator==

template<typename _RealType  = double> bool operator== (const cauchy_distribution< _RealType > & __d1, const cauchy_distribution< _RealType > & __d2) [friend]

Return true if two Cauchy distributions have the same parameters.


🌈 Author

Generated automatically by Doxygen for libstdc++ from the source code.


mwah πŸ’‹ this page came from libstdc++, manual section 3cxx β€” source/version noted, and the footer is just giving β€œshe's from libstdc++ and she's in 3cxx” energy. no cap, we made it through the whole roster together, bestie πŸ’–βœ¨

πŸ“¦ where this page comes from