다음을 통해 공유


geometric_distribution::geometric_distribution

Constructs the distribution.

explicit geometric_distribution(RealType p = 0.5);

explicit geometric_distribution(const param_type& parm);

Parameters

  • p
    The p distribution parameter.

  • parm
    The parameter structure used to construct the distribution.

Remarks

**Precondition:**0.0 < p && p < 1.0

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

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.

Requirements

Header: <random>

Namespace: std

See Also

Reference

<random>

geometric_distribution Class