Export (0) Print
Expand All

normal_distribution Class

Generates a 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

The floating-point distribution value type.

The template class describes a distribution that produces values of a user-specified floating-point type with a normal distribution.

Header: <random>

Namespace: std

Community Additions

ADD
Show:
© 2014 Microsoft