Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

normal_distribution Class

Generates a normal distribution.

template<class RealType = double>
    class normal_distribution {
public:
    typedef RealType input_type;
    typedef RealType result_type;
    explicit normal_distribution(const result_type& mean0 = 0,
        const result_type& sigma0 = 1);
    result_type mean() const;
    result_type sigma() const;
    void reset();
    template<class Engine>
        result_type operator()(Engine& eng);
private:
    result_type stored_mean;     // exposition only
    result_type stored_sigma;    // exposition only
    };

RealType

The floating-point distribution value type.

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

Header: <random>

Namespace: std::tr1

Community Additions

ADD
Show:
© 2015 Microsoft