cppannotations/yo/stl/uniformreal.yo
2010-12-19 10:51:50 +00:00

38 lines
1.3 KiB
Text

The ti(uniform_real_distribution<RealType = double>) can be used to select
tt(RealType) values randomly from a range of uniformly distributed
tt(RealType) values.
It has two parameters, tt(a) and tt(b), specifying, respectively, the
half-open range of values (rangett(a, b)) that can be returned by the
distribution.
Defined types:
verb(
typedef RealType result_type;
struct param_type
{
explicit param_type(RealType a = 0, RealType b = max(RealType));
RealType a() const;
RealType b() const;
};
)
Constructors and members:
itemization(
itt(uniform_real_distribution<>(RealType a = 0, RealType b = max(RealType)))
constructs a uniform_real distribution for the specified range of
values.
itt(uniform_real_distribution<>(param_type const &param))
constructs a uniform_real distribution according to the values stored in
the tt(param) struct.
itt(RealType a() const)nl()
returns the distribution's tt(a) parameter;
itt(RealType b() const)nl()
returns the distribution's tt(b) parameter;
itt(result_type min() const)nl()
returns the distribution's tt(a) parameter;
itt(result_type max() const)nl()
returns the distribution's tt(b) parameter;
)