次の方法で共有


normal_distribution クラス

正規分布を生成します。

template<class RealType = double>
    class normal_distribution {
public:
    typedef T1 input_type;
    typedef RealType result_type;
    struct param_type;
    explicit normal_distribution(result_type mean0 = result_type(0.0),
        result_type sigma0 = result_type(1.0));
    explicit normal_distribution(const param_type& par0);
    result_type mean() const;
    result_type sigma() const;
    result_type stddev() const;
    param_type param() const;
    void param(const param_type& par0);
    result_type min() const;
    result_type max() const;
    void reset();
    template<class Engine>
        result_type operator()(Engine& eng);
    template<class Engine>
        result_type operator()(Engine& eng,
            const param_type& par0);
private:
    result_type stored_mean;     // exposition only
    result_type stored_sigma;    // exposition only
    };

パラメーター

  • RealType
    分布の値を表す浮動小数点型。

解説

このテンプレート クラスは、正規分布を使用してユーザー指定の浮動小数点型の値を生成する分布を表します。

必要条件

ヘッダー : <random>

名前空間: std

参照

関連項目

<random>

normal_distribution::mean

normal_distribution::normal_distribution

normal_distribution::operator()

normal_distribution::sigma

normal_distribution::param

normal_distribution::param_type