public member function
<random>

std::geometric_distribution::p

double p() const;
Probability of success
Returns the parameter p associated with the geometric_distribution.

This parameter represents the probability of success on each of the sequence of independent Bernoulli-distributed experiments each value generated by operator() is said to simulate.

This parameter is set on construction.

Parameters

none

Return value

The probability parameter (p) associated with the distribution object.

Complexity

Constant.

See also