“cpp/numeric/random/poisson distribution/operator()”的版本间的差异

来自cppreference.com
(1个修订: Translate from the English version)
(r2.7.3) (机器人添加:de, en, es, fr, it, ja, pt, ru)
第1行: 第1行:
 
{{cpp/numeric/random/distribution/operator()|poisson_distribution}}
 
{{cpp/numeric/random/distribution/operator()|poisson_distribution}}
 +
 +
 +
 +
 +
 +
 +
 +
 +

2012年11月2日 (五) 18:08的版本

 
 
 
 
 
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()