Compartilhar via


binomial_distribution::binomial_distribution

Constructs the distribution.

explicit binomial_distribution(IntType t = 1, double p = 0.5);

explicit binomial_distribution(const param_type& parm);

Parameters

  • t
    The t distribution parameter.

  • p
    The p distribution parameter.

  • parm
    The parameter structure used to construct the distribution.

Remarks

**Precondition:**0 ≤ t and 0.0 ≤ p ≤ 1.0

The first constructor constructs an object whose stored p value holds the value p and whose stored t value holds the value t.

The second constructor constructs an object whose stored parameters are initialized from parm. You can obtain and set the current parameters of an existing distribution by calling the param() member function.

For more information and a code example, see binomial_distribution Class.

Requirements

Header: <random>

Namespace: std

See Also

Reference

<random>

binomial_distribution Class