tmp/tmpn7_w6ty1/{from.md → to.md}
RENAMED
|
@@ -6,27 +6,26 @@ probability function $$%
|
|
| 6 |
P(i\,|\,a,b) = 1 / (b - a + 1)
|
| 7 |
\; \mbox{.}$$
|
| 8 |
|
| 9 |
``` cpp
|
| 10 |
template<class IntType = int>
|
| 11 |
-
|
| 12 |
-
{
|
| 13 |
public:
|
| 14 |
// types
|
| 15 |
-
|
| 16 |
-
|
| 17 |
|
| 18 |
// constructors and reset functions
|
| 19 |
explicit uniform_int_distribution(IntType a = 0, IntType b = numeric_limits<IntType>::max());
|
| 20 |
explicit uniform_int_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;
|
|
|
|
| 6 |
P(i\,|\,a,b) = 1 / (b - a + 1)
|
| 7 |
\; \mbox{.}$$
|
| 8 |
|
| 9 |
``` cpp
|
| 10 |
template<class IntType = int>
|
| 11 |
+
class uniform_int_distribution {
|
|
|
|
| 12 |
public:
|
| 13 |
// types
|
| 14 |
+
using result_type = IntType;
|
| 15 |
+
using param_type = unspecified;
|
| 16 |
|
| 17 |
// constructors and reset functions
|
| 18 |
explicit uniform_int_distribution(IntType a = 0, IntType b = numeric_limits<IntType>::max());
|
| 19 |
explicit uniform_int_distribution(const param_type& parm);
|
| 20 |
void reset();
|
| 21 |
|
| 22 |
// generating functions
|
| 23 |
+
template<class URBG>
|
| 24 |
+
result_type operator()(URBG& g);
|
| 25 |
+
template<class URBG>
|
| 26 |
+
result_type operator()(URBG& g, const param_type& parm);
|
| 27 |
|
| 28 |
// property functions
|
| 29 |
result_type a() const;
|
| 30 |
result_type b() const;
|
| 31 |
param_type param() const;
|