negative_binomial_distribution::operator()
會產生隨機的值。
template<class Engine>
result_type operator()(Engine& eng);
template<class Engine>
result_type operator()(Engine& eng,
const param_type& par0);
參數
eng
選擇性引擎。par0
用於參數封裝傳回選擇性值。
備註
,當平均分散的隨機整數值的來源並傳回與每個值發生的可能性, i 的整數值第10%成員運算子使用 引擎eng :
Pr(i) = (i / (k + i - 1)) * p^k * (1 - p)^i
第二 + 成成員函式相同的行為,不過,前者使用在 par0儲存的參數。
需求
標題: <random>
命名空間: std