Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
boost::random::uniform_real_distribution< RealType > Class Template Reference

The class template uniform_real_distribution models a . More...

#include <uniform_real_distribution.hpp>

Inheritance diagram for boost::random::uniform_real_distribution< RealType >:

Classes

class  param_type
 

Public Types

typedef RealType input_type
 
typedef RealType result_type
 

Public Member Functions

 uniform_real_distribution (RealType min_arg=RealType(0.0), RealType max_arg=RealType(1.0))
 Constructs a uniform_real_distribution. More...
 
 uniform_real_distribution (const param_type &parm)
 Constructs a uniform_real_distribution from its parameters. More...
 
RealType min BOOST_PREVENT_MACRO_SUBSTITUTION () const
 Returns the minimum value of the distribution. More...
 
RealType max BOOST_PREVENT_MACRO_SUBSTITUTION () const
 Returns the maximum value of the distribution. More...
 
RealType a () const
 Returns the minimum value of the distribution. More...
 
RealType b () const
 Returns the maximum value of the distribution. More...
 
param_type param () const
 Returns the parameters of the distribution. More...
 
void param (const param_type &parm)
 Sets the parameters of the distribution. More...
 
void reset ()
 Effects: Subsequent uses of the distribution do not depend on values produced by any engine prior to invoking reset. More...
 
template<class Engine >
result_type operator() (Engine &eng) const
 Returns a value uniformly distributed in the range [min, max). More...
 
template<class Engine >
result_type operator() (Engine &eng, const param_type &parm) const
 Returns a value uniformly distributed in the range [param.a(), param.b()). More...
 
 BOOST_RANDOM_DETAIL_OSTREAM_OPERATOR (os, uniform_real_distribution, ud)
 Writes the distribution to a std::ostream. More...
 
 BOOST_RANDOM_DETAIL_ISTREAM_OPERATOR (is, uniform_real_distribution, ud)
 Reads the distribution from a std::istream. More...
 
 BOOST_RANDOM_DETAIL_EQUALITY_OPERATOR (uniform_real_distribution, lhs, rhs)
 Returns true if the two distributions will produce identical sequences of values given equal generators. More...
 

Detailed Description

template<class RealType = double>
class boost::random::uniform_real_distribution< RealType >

The class template uniform_real_distribution models a .

On each invocation, it returns a random floating-point value uniformly distributed in the range [min..max).

Member Typedef Documentation

template<class RealType = double>
typedef RealType boost::random::uniform_real_distribution< RealType >::input_type
template<class RealType = double>
typedef RealType boost::random::uniform_real_distribution< RealType >::result_type

Constructor & Destructor Documentation

template<class RealType = double>
boost::random::uniform_real_distribution< RealType >::uniform_real_distribution ( RealType  min_arg = RealType(0.0),
RealType  max_arg = RealType(1.0) 
)
inlineexplicit

Constructs a uniform_real_distribution.

min and max are the parameters of the distribution.

Requires: min <= max

References BOOST_ASSERT.

template<class RealType = double>
boost::random::uniform_real_distribution< RealType >::uniform_real_distribution ( const param_type parm)
inlineexplicit

Constructs a uniform_real_distribution from its parameters.

Member Function Documentation

template<class RealType = double>
RealType boost::random::uniform_real_distribution< RealType >::a ( ) const
inline

Returns the minimum value of the distribution.

Referenced by boost::uniform_real< RealType >::param().

template<class RealType = double>
RealType boost::random::uniform_real_distribution< RealType >::b ( ) const
inline

Returns the maximum value of the distribution.

Referenced by boost::uniform_real< RealType >::param().

template<class RealType = double>
RealType min boost::random::uniform_real_distribution< RealType >::BOOST_PREVENT_MACRO_SUBSTITUTION ( ) const
inline

Returns the minimum value of the distribution.

template<class RealType = double>
RealType max boost::random::uniform_real_distribution< RealType >::BOOST_PREVENT_MACRO_SUBSTITUTION ( ) const
inline

Returns the maximum value of the distribution.

template<class RealType = double>
boost::random::uniform_real_distribution< RealType >::BOOST_RANDOM_DETAIL_EQUALITY_OPERATOR ( uniform_real_distribution< RealType >  ,
lhs  ,
rhs   
)
inline

Returns true if the two distributions will produce identical sequences of values given equal generators.

template<class RealType = double>
boost::random::uniform_real_distribution< RealType >::BOOST_RANDOM_DETAIL_ISTREAM_OPERATOR ( is  ,
uniform_real_distribution< RealType >  ,
ud   
)
inline

Reads the distribution from a std::istream.

template<class RealType = double>
boost::random::uniform_real_distribution< RealType >::BOOST_RANDOM_DETAIL_OSTREAM_OPERATOR ( os  ,
uniform_real_distribution< RealType >  ,
ud   
)
inline

Writes the distribution to a std::ostream.

template<class RealType = double>
template<class Engine >
result_type boost::random::uniform_real_distribution< RealType >::operator() ( Engine &  eng) const
inline

Returns a value uniformly distributed in the range [min, max).

References boost::random::detail::generate_uniform_real().

template<class RealType = double>
template<class Engine >
result_type boost::random::uniform_real_distribution< RealType >::operator() ( Engine &  eng,
const param_type parm 
) const
inline
template<class RealType = double>
param_type boost::random::uniform_real_distribution< RealType >::param ( ) const
inline
template<class RealType = double>
void boost::random::uniform_real_distribution< RealType >::param ( const param_type parm)
inline
template<class RealType = double>
void boost::random::uniform_real_distribution< RealType >::reset ( void  )
inline

Effects: Subsequent uses of the distribution do not depend on values produced by any engine prior to invoking reset.


The documentation for this class was generated from the following file: