Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Class template uniform_01

boost::random::uniform_01

Synopsis

// In header: <boost/random/uniform_01.hpp>

template<typename RealType> 
class uniform_01 {
public:
  // types
  typedef  ; 
  typedef  ;

  // public member functions
   () ;
   () ;
   ();
  template<typename Engine>  ();
};

Description

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.

uniform_01 public member functions

  1.  () ;
  2.  () ;
  3.  ();
  4. template<typename Engine>  ( eng);

PrevUpHomeNext