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

The distribution function uniform_real models a random distribution. More...

#include <uniform_real.hpp>

Inheritance diagram for boost::uniform_real< RealType >:
Collaboration diagram for boost::uniform_real< RealType >:

Classes

class  param_type
 

Public Types

typedef RealType input_type
 
typedef RealType result_type
 

Public Member Functions

 uniform_real (RealType min_arg=RealType(0.0), RealType max_arg=RealType(1.0))
 Constructs a uniform_real object. More...
 
 uniform_real (const param_type &parm)
 Constructs a uniform_real distribution from its parameters. 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...
 
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...
 
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::uniform_real< RealType >

The distribution function uniform_real models a random distribution.

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

This class is deprecated. Please use uniform_real_distribution in new code.

Member Typedef Documentation

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

Constructor & Destructor Documentation

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

Constructs a uniform_real object.

min and max are the parameters of the distribution.

Requires: min <= max

References BOOST_ASSERT.

template<class RealType = double>
boost::uniform_real< RealType >::uniform_real ( 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
inlineinherited

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
inlineinherited

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
inlineinherited

Returns the minimum value of the distribution.

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

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   
)
inlineinherited

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   
)
inlineinherited

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   
)
inlineinherited

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
inlineinherited

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
inlineinherited
template<class RealType = double>
param_type boost::uniform_real< RealType >::param ( ) const
inline
template<class RealType = double>
void boost::uniform_real< RealType >::param ( const param_type parm)
inline

Sets the parameters of the distribution.

References boost::random::uniform_real_distribution< RealType >::param().

template<class RealType = double>
void boost::random::uniform_real_distribution< RealType >::param ( const param_type parm)
inlineinherited
template<class RealType = double>
void boost::random::uniform_real_distribution< RealType >::reset ( void  )
inlineinherited

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: