![]() |
Home | Libraries | People | FAQ | More |
boost::random::uniform_01
// In header: <boost/random/uniform_01.hpp> template<typename RealType> class uniform_01 { public: // types typedef ; typedef ; // public member functions () ; () ; (); template<typename Engine> (); };
The distribution function uniform_01 models a random distribution . On each invocation, it returns a random floating-point value uniformly distributed in the range [0..1).
The template parameter RealType shall denote a float-like value type with support for binary operators +, -, and /.
Note: The current implementation is buggy, because it may not fill all of the mantissa with random bits. I'm unsure how to fill a (to-be-invented) boost::bigfloat
class with random bits efficiently. It's probably time for a traits class.