From Jason Turner

[rand.dist.uni.int]

Diff to HTML by rtfpessoa

tmp/tmpqf_i_alt/{from.md → to.md} RENAMED
@@ -1,23 +1,22 @@
1
  ##### Class template `uniform_int_distribution` <a id="rand.dist.uni.int">[[rand.dist.uni.int]]</a>
2
 
3
  A `uniform_int_distribution` random number distribution produces random
4
  integers i, a ≤ i ≤ b, distributed according to the constant discrete
5
- probability function $$%
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>
@@ -34,17 +33,17 @@ template<class IntType = int>
34
  result_type max() const;
35
  };
36
  ```
37
 
38
  ``` cpp
39
- explicit uniform_int_distribution(IntType a = 0, IntType b = numeric_limits<IntType>::max());
40
  ```
41
 
42
- *Requires:* `a` ≤ `b`.
43
 
44
- *Effects:* Constructs a `uniform_int_distribution` object; `a` and `b`
45
- correspond to the respective parameters of the distribution.
46
 
47
  ``` cpp
48
  result_type a() const;
49
  ```
50
 
 
1
  ##### Class template `uniform_int_distribution` <a id="rand.dist.uni.int">[[rand.dist.uni.int]]</a>
2
 
3
  A `uniform_int_distribution` random number distribution produces random
4
  integers i, a ≤ i ≤ b, distributed according to the constant discrete
5
+ probability function $$P(i\,|\,a,b) = 1 / (b - a + 1) \text{ .}$$
 
 
6
 
7
  ``` cpp
8
  template<class IntType = int>
9
  class uniform_int_distribution {
10
  public:
11
  // types
12
  using result_type = IntType;
13
  using param_type = unspecified;
14
 
15
  // constructors and reset functions
16
+ uniform_int_distribution() : uniform_int_distribution(0) {}
17
+ explicit uniform_int_distribution(IntType a, IntType b = numeric_limits<IntType>::max());
18
  explicit uniform_int_distribution(const param_type& parm);
19
  void reset();
20
 
21
  // generating functions
22
  template<class URBG>
 
33
  result_type max() const;
34
  };
35
  ```
36
 
37
  ``` cpp
38
+ explicit uniform_int_distribution(IntType a, IntType b = numeric_limits<IntType>::max());
39
  ```
40
 
41
+ *Preconditions:* `a` ≤ `b`.
42
 
43
+ *Remarks:* `a` and `b` correspond to the respective parameters of the
44
+ distribution.
45
 
46
  ``` cpp
47
  result_type a() const;
48
  ```
49