The distribution function uniform_real models a random distribution. More...
#include <uniform_real.hpp>
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... | |
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.
|
inherited |
|
inherited |
|
inlineexplicit |
Constructs a uniform_real object.
min
and max
are the parameters of the distribution.
Requires: min <= max
References BOOST_ASSERT.
|
inlineexplicit |
Constructs a uniform_real distribution from its parameters.
|
inlineinherited |
Returns the minimum value of the distribution.
Referenced by boost::uniform_real< RealType >::param().
|
inlineinherited |
Returns the maximum value of the distribution.
Referenced by boost::uniform_real< RealType >::param().
|
inlineinherited |
Returns the minimum value of the distribution.
|
inlineinherited |
Returns the maximum value of the distribution.
|
inlineinherited |
Returns true if the two distributions will produce identical sequences of values given equal generators.
|
inlineinherited |
Reads the distribution from a std::istream
.
|
inlineinherited |
Writes the distribution to a std::ostream
.
|
inlineinherited |
Returns a value uniformly distributed in the range [min, max).
References boost::random::detail::generate_uniform_real().
|
inlineinherited |
Returns a value uniformly distributed in the range [param.a(), param.b()).
References boost::random::uniform_real_distribution< RealType >::param_type::a(), boost::random::uniform_real_distribution< RealType >::param_type::b(), and boost::random::detail::generate_uniform_real().
|
inline |
Returns the parameters of the distribution.
References boost::random::uniform_real_distribution< RealType >::a(), and boost::random::uniform_real_distribution< RealType >::b().
|
inline |
Sets the parameters of the distribution.
References boost::random::uniform_real_distribution< RealType >::param().
|
inlineinherited |
Sets the parameters of the distribution.
References boost::random::uniform_real_distribution< RealType >::param_type::a(), and boost::random::uniform_real_distribution< RealType >::param_type::b().
|
inlineinherited |
Effects: Subsequent uses of the distribution do not depend on values produced by any engine prior to invoking reset.