...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
boost::normal_distribution
// In header: <boost/random/normal_distribution.hpp> template<typename RealType = double> class normal_distribution { public: // types typedef RealType input_type; typedef RealType result_type; // construct/copy/destruct normal_distribution(const result_type & = result_type(0), const result_type & = result_type(1)); normal_distribution(const normal_distribution &); // public member functions RealType mean() const; RealType sigma() const; void reset(); template<typename Engine> result_type operator()(Engine &); };
Instantiations of class template normal_distribution model a random distribution . Such a distribution produces random numbers x
distributed with probability density function , where mean and sigma are the parameters of the distribution.
normal_distribution
public
construct/copy/destructnormal_distribution(const result_type & mean_arg = result_type(0), const result_type & sigma_arg = result_type(1));
Constructs a normal_distribution object. mean
and sigma
are the parameters for the distribution.
Requires: sigma > 0
normal_distribution(const normal_distribution & other);