名前空間
変種
操作

std::binomial_distribution<IntType>::binomial_distribution

提供: cppreference.com
 
 
 
擬似乱数生成
一様ランダムビットジェネレータ
エンジンとエンジンアダプタ
非決定的なジェネレータ
分布
一様分布
ベルヌーイ分布
ポアソン分布
正規分布
標本分布
シードシーケンス
(C++11)
C のライブラリ
 
 
binomial_distribution() : binomial_distribution(1) {}
(1) (C++11以上)
explicit binomial_distribution( IntType t, double p = 0.5 );
(2) (C++11以上)
explicit binomial_distribution( const param_type& params );
(3) (C++11以上)

新しい分布オブジェクトを構築します��� (2) は分布のパラメータとして tp を使用し、 (3) は分布のパラメータとして params を使用します。

[編集] 引数

t - 分布のパラメータ t (試行の数)
p - 分布のパラメータ p (true を生成する試行の確率)
params - 分布のパラメータセット

[編集] ノート

0 ≤ p ≤ 1 かつ 0 ≤ t であることが要求されます。

[編集] 欠陥報告

以下の動作変更欠陥報告は以前に発行された C++ 標準に遡って適用されました。

DR 適用先 発行時の動作 正しい動作
P0935R0 C++11 default constructor was explicit made implicit