tmp/tmp8samga3v/{from.md → to.md}
RENAMED
|
@@ -4,29 +4,31 @@ A `uniform_real_distribution` random number distribution produces random
|
|
| 4 |
numbers x, a ≤ x < b, distributed according to the constant probability
|
| 5 |
density function $$%
|
| 6 |
p(x\,|\,a,b) = 1 / (b - a)
|
| 7 |
\; \mbox{.}$$
|
| 8 |
|
|
|
|
|
|
|
|
|
|
| 9 |
``` cpp
|
| 10 |
template<class RealType = double>
|
| 11 |
-
|
| 12 |
-
{
|
| 13 |
public:
|
| 14 |
// types
|
| 15 |
-
|
| 16 |
-
|
| 17 |
|
| 18 |
// constructors and reset functions
|
| 19 |
explicit uniform_real_distribution(RealType a = 0.0, RealType b = 1.0);
|
| 20 |
explicit uniform_real_distribution(const param_type& parm);
|
| 21 |
void reset();
|
| 22 |
|
| 23 |
// generating functions
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
|
| 29 |
// property functions
|
| 30 |
result_type a() const;
|
| 31 |
result_type b() const;
|
| 32 |
param_type param() const;
|
|
|
|
| 4 |
numbers x, a ≤ x < b, distributed according to the constant probability
|
| 5 |
density function $$%
|
| 6 |
p(x\,|\,a,b) = 1 / (b - a)
|
| 7 |
\; \mbox{.}$$
|
| 8 |
|
| 9 |
+
[*Note 1*: This implies that p(x | a,b) is undefined when
|
| 10 |
+
`a == b`. — *end note*]
|
| 11 |
+
|
| 12 |
``` cpp
|
| 13 |
template<class RealType = double>
|
| 14 |
+
class uniform_real_distribution {
|
|
|
|
| 15 |
public:
|
| 16 |
// types
|
| 17 |
+
using result_type = RealType;
|
| 18 |
+
using param_type = unspecified;
|
| 19 |
|
| 20 |
// constructors and reset functions
|
| 21 |
explicit uniform_real_distribution(RealType a = 0.0, RealType b = 1.0);
|
| 22 |
explicit uniform_real_distribution(const param_type& parm);
|
| 23 |
void reset();
|
| 24 |
|
| 25 |
// generating functions
|
| 26 |
+
template<class URBG>
|
| 27 |
+
result_type operator()(URBG& g);
|
| 28 |
+
template<class URBG>
|
| 29 |
+
result_type operator()(URBG& g, const param_type& parm);
|
| 30 |
|
| 31 |
// property functions
|
| 32 |
result_type a() const;
|
| 33 |
result_type b() const;
|
| 34 |
param_type param() const;
|