std::gamma_distribution<RealType>::operator()
来自cppreference.com
< cpp | numeric | random | gamma distribution
template<class Generator > result_type operator()( Generator& g ); | (1) | (C++11 起) |
template<class Generator > result_type operator()( Generator& g, const param_type& params ); | (2) | (C++11 起) |
生成根据关联的概率函数分布的随机数。由调用 g.operator() 获得熵。
第一版本使用关联的参数集,第二版本用 params。不修改关联参数集。
[编辑]参数
g | - | 均匀随机位生成器对象 |
params | - | 用于替代所关联分布参数集的分布参数集 |
类型要求 | ||
-Generator 必须满足均匀随机位生成器(UniformRandomBitGenerator) 。 |
[编辑]返回值
生成的随机数。
[编辑]复杂度
均摊常数次调用 g.operator()。