std::binomial_distribution<IntType>::binomial_distribution
提供: cppreference.com
< cpp | numeric | random | binomial distribution
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) は分布のパラメータとして t
と p
を使用し、 (3) は分布のパラメータとして params
を使用します。
[編集] 引数
t | - | 分布のパラメータ t (試行の数) |
p | - | 分布のパラメータ p (true を生成する試行の確率) |
params | - | 分布のパラメータセット |
[編集] ノート
0 ≤ p ≤ 1 かつ 0 ≤ t であることが要求されます。
[編集] 欠陥報告
以下の動作変更欠陥報告は以前に発行された C++ 標準に遡って適用されました。
DR | 適用先 | 発行時の動作 | 正しい動作 |
---|---|---|---|
P0935R0 | C++11 | default constructor was explicit | made implicit |