Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Constructs the distribution.
explicit negative_binomial_distribution(IntType k = 1, double p = 0.5);
explicit negative_binomial_distribution(const param_type& parm);
Parameters
k
The k distribution parameter.p
The p distribution parameter.parm
The parameter structure used to construct the distribution.
Remarks
**Precondition:**0.0 < k and 0.0 < p ≤ 1.0
The first constructor constructs an object whose stored p value holds the value p and whose stored k value holds the value k.
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