chi_squared_distribution::operator()

乱数値を返します。

template<class Engine>
    result_type operator()(Engine& eng);
template<class Engine>
    result_type operator()(Engine& eng,
        const param_type& par0);

パラメーター

  • eng
    乱数エンジン。

  • par0
    乱数値を返すために使用されるパラメーター パッケージ。

解説

1 つ目のメンバー演算子は、<random>eng を一様に分布したランダムな整数値のソースとして使用して、浮動小数点値を返します。それぞれの x 値は、次の確率で発生します。

Pr(x) = x^(n / 2 - 1) * e^-(x / 2) / (gamma(n / 2) * 2^(n / 2))

2 つ目のメンバー関数は、1 つ目のメンバー関数と動作は同じですが、par0 に格納されているパラメーターを使用する点が異なります。

必要条件

ヘッダー : <random>

名前空間: std

参照

関連項目

<random>

chi_squared_distribution クラス