student_t_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 つ目のメンバー演算子は、エンジンeng を一様に分布したランダムな整数値のソースとして使用して、浮動小数点値を返します。それぞれの x 値は、pr(x) = 1 / √(n * pi) * ((gamma((n + 1) / 2)) / (gamma(n / 2))) * (1 + x² / n)^-((n + 1) / 2)) という確率で発生します。

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

必要条件

ヘッダー : <random>

名前空間: std

参照

関連項目

<random>

student_t_distribution クラス