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