libstdc++: Bernoulli Distributions

libstdc++

Bernoulli Distributions
Numerics » Random Number Generation » Random Number Distributions
Collaboration diagram for Bernoulli Distributions:

## Classes
class | std::bernoulli_distribution
class | std::binomial_distribution< _IntType >
class | std::geometric_distribution< _IntType >
class | std::negative_binomial_distribution< _IntType >

## Functions
template<typename _CharT, typename _Traits>
std::basic_ostream< _CharT, _Traits > & | std::operator<< (std::basic_ostream< _CharT, _Traits > &__os, const std::bernoulli_distribution &__x)
template<typename _IntType, typename _CharT, typename _Traits>
std::basic_ostream< _CharT, _Traits > & | std::operator<< (std::basic_ostream< _CharT, _Traits > &__os, const std::geometric_distribution< _IntType > &__x)
template<typename _CharT, typename _Traits>
std::basic_istream< _CharT, _Traits > & | std::operator>> (std::basic_istream< _CharT, _Traits > &__is, std::bernoulli_distribution &__x)
template<typename _IntType, typename _CharT, typename _Traits>
std::basic_istream< _CharT, _Traits > & | std::operator>> (std::basic_istream< _CharT, _Traits > &__is, std::geometric_distribution< _IntType > &__x)

## Detailed Description

## Function Documentation

## ◆ operator<<() [1/2]

template<typename _CharT, typename _Traits>

std::basic_ostream< _CharT, _Traits > & std::operator<< | ( | std::basic_ostream< _CharT, _Traits > & | __os,
|  | const std::bernoulli_distribution & | __x )

Inserts a bernoulli_distribution random number distribution `__x` into the output stream `__os`.

Parameters

  __os | An output stream.
  __x | A bernoulli_distribution random number distribution.

Returns
  The output stream with the state of `__x` inserted or in an error state.

Definition at line 1142 of file bits/random.tcc.

## ◆ operator<<() [2/2]

template<typename _IntType, typename _CharT, typename _Traits>

std::basic_ostream< _CharT, _Traits > & std::operator<< | ( | std::basic_ostream< _CharT, _Traits > & | __os,
|  | const std::geometric_distribution< _IntType > & | __x )

Inserts a geometric_distribution random number distribution `__x` into the output stream `__os`.

Parameters

  __os | An output stream.
  __x | A geometric_distribution random number distribution.

Returns
  The output stream with the state of `__x` inserted or in an error state.

Definition at line 1208 of file bits/random.tcc.

References std::numeric_limits< _Tp >::epsilon(), log(), and std::numeric_limits< _Tp >::max().

## ◆ operator>>() [1/2]

template<typename _CharT, typename _Traits>

std::basic_istream< _CharT, _Traits > & std::operator>> | ( | std::basic_istream< _CharT, _Traits > & | __is,
|  | std::bernoulli_distribution & | __x )
| inline

Extracts a bernoulli_distribution random number distribution `__x` from the input stream `__is`.

Parameters

  __is | An input stream.
  __x | A bernoulli_distribution random number generator engine.

Returns
  The input stream with `__x` extracted or in an error state.

Definition at line 4567 of file random.h.

References std::bernoulli_distribution::param().

## ◆ operator>>() [2/2]

template<typename _IntType, typename _CharT, typename _Traits>

std::basic_istream< _CharT, _Traits > & std::operator>> | ( | std::basic_istream< _CharT, _Traits > & | __is,
|  | std::geometric_distribution< _IntType > & | __x )

Extracts a geometric_distribution random number distribution `__x` from the input stream `__is`.

Parameters

  __is | An input stream.
  __x | A geometric_distribution random number generator engine.

Returns
  The input stream with `__x` extracted or in an error state.

Definition at line 1262 of file bits/random.tcc.

References std::ios_base::flags(), and std::geometric_distribution< _IntType >::param().