std::discrete_distribution<IntType>:: discrete_distribution
|
discrete_distribution
(
)
;
|
(1) | (C++11以降) |
|
template
<
class
InputIt
>
discrete_distribution ( InputIt first, InputIt last ) ; |
(2) | (C++11以降) |
|
discrete_distribution
(
std::
initializer_list
<
double
>
weights
)
;
|
(3) | (C++11以降) |
|
template
<
class
UnaryOperation
>
discrete_distribution
(
std::
size_t
count,
double
xmin,
double
xmax,
|
(4) | (C++11以降) |
|
explicit
discrete_distribution
(
const
param_type
&
params
)
;
|
(5) | (C++11以降) |
新しい分布オブジェクトを構築します。
[
first
,
last
)
内の重みで分布を構築します。
first
==
last
の場合、効果はデフォルトコンストラクタと同じです。
| (xmax − xmin) |
| count |
パラメータ
| first, last | - |
重みとして使用する数値を定義する要素の範囲。
InputIterator
によって参照される要素の型は
double
に変換可能でなければならない
|
| weights | - | 重みを含む初期化子リスト |
| unary_op | - |
適用される単項演算関数オブジェクト
関数のシグネチャは以下と同等であるべき: Ret fun ( const Type & a ) ;
シグネチャは
const
&
を持つ必要はない
|
| params | - | 分布パラメータセット |
| 型要件 | ||
-
InputIt
は
LegacyInputIterator
の要件を満たさなければならない
|
||