From Jason Turner

[rand.predef]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpdhh9ydpn/{from.md → to.md} +28 -30
tmp/tmpdhh9ydpn/{from.md → to.md} RENAMED
@@ -1,103 +1,101 @@
1
  ### Engines and engine adaptors with predefined parameters <a id="rand.predef">[[rand.predef]]</a>
2
 
3
  ``` cpp
4
- typedef linear_congruential_engine<uint_fast32_t, 16807, 0, 2147483647>
5
- minstd_rand0;
6
  ```
7
 
8
  *Required behavior:* The $10000^{\,th}$ consecutive invocation of a
9
  default-constructed object of type `minstd_rand0` shall produce the
10
  value 1043618065.
11
 
12
  ``` cpp
13
- typedef linear_congruential_engine<uint_fast32_t, 48271, 0, 2147483647>
14
- minstd_rand;
15
  ```
16
 
17
  *Required behavior:* The $10000^{\,th}$ consecutive invocation of a
18
  default-constructed object of type `minstd_rand` shall produce the value
19
  399268537.
20
 
21
  ``` cpp
22
- typedef mersenne_twister_engine<uint_fast32_t,
23
- 32,624,397,31,0x9908b0df,11,0xffffffff,7,0x9d2c5680,15,0xefc60000,18,1812433253>
24
- mt19937;
25
  ```
26
 
27
  *Required behavior:* The $10000^{\,th}$ consecutive invocation of a
28
  default-constructed object of type `mt19937` shall produce the value
29
  4123659995.
30
 
31
  ``` cpp
32
- typedef mersenne_twister_engine<uint_fast64_t,
 
33
  64,312,156,31,0xb5026f5aa96619e9,29,
34
  0x5555555555555555,17,
35
  0x71d67fffeda60000,37,
36
  0xfff7eee000000000,43,
37
- 6364136223846793005>
38
- mt19937_64;
39
  ```
40
 
41
  *Required behavior:* The $10000^{\,th}$ consecutive invocation of a
42
  default-constructed object of type `mt19937_64` shall produce the value
43
  9981545732273789042.
44
 
45
  ``` cpp
46
- typedef subtract_with_carry_engine<uint_fast32_t, 24, 10, 24>
47
- ranlux24_base;
48
  ```
49
 
50
  *Required behavior:* The $10000^{\,th}$ consecutive invocation of a
51
  default-constructed object of type `ranlux24_base` shall produce the
52
  value 7937952.
53
 
54
  ``` cpp
55
- typedef subtract_with_carry_engine<uint_fast64_t, 48, 5, 12>
56
- ranlux48_base;
57
  ```
58
 
59
  *Required behavior:* The $10000^{\,th}$ consecutive invocation of a
60
  default-constructed object of type `ranlux48_base` shall produce the
61
  value 61839128582725.
62
 
63
  ``` cpp
64
- typedef discard_block_engine<ranlux24_base, 223, 23>
65
- ranlux24;
66
  ```
67
 
68
  *Required behavior:* The $10000^{\,th}$ consecutive invocation of a
69
  default-constructed object of type `ranlux24` shall produce the value
70
  9901578.
71
 
72
  ``` cpp
73
- typedef discard_block_engine<ranlux48_base, 389, 11>
74
- ranlux48;
75
  ```
76
 
77
  *Required behavior:* The $10000^{\,th}$ consecutive invocation of a
78
  default-constructed object of type `ranlux48` shall produce the value
79
  249142670248501.
80
 
81
  ``` cpp
82
- typedef shuffle_order_engine<minstd_rand0,256>
83
- knuth_b;
84
  ```
85
 
86
  *Required behavior:* The $10000^{\,th}$ consecutive invocation of a
87
  default-constructed object of type `knuth_b` shall produce the value
88
  1112339016.
89
 
90
  ``` cpp
91
- typedef implementation-defined
92
- default_random_engine;
93
  ```
94
 
95
- The choice of engine type named by this `typedef` is
96
- implementation-defined. The implementation may select this type on the
97
- basis of performance, size, quality, or any combination of such factors,
98
- so as to provide at least acceptable engine behavior for relatively
99
- casual, inexpert, and/or lightweight use. Because different
100
- implementations may select different underlying engine types, code that
101
- uses this `typedef` need not generate identical sequences across
102
- implementations.
 
 
103
 
 
1
  ### Engines and engine adaptors with predefined parameters <a id="rand.predef">[[rand.predef]]</a>
2
 
3
  ``` cpp
4
+ using minstd_rand0 =
5
+ linear_congruential_engine<uint_fast32_t, 16807, 0, 2147483647>;
6
  ```
7
 
8
  *Required behavior:* The $10000^{\,th}$ consecutive invocation of a
9
  default-constructed object of type `minstd_rand0` shall produce the
10
  value 1043618065.
11
 
12
  ``` cpp
13
+ using minstd_rand =
14
+ linear_congruential_engine<uint_fast32_t, 48271, 0, 2147483647>;
15
  ```
16
 
17
  *Required behavior:* The $10000^{\,th}$ consecutive invocation of a
18
  default-constructed object of type `minstd_rand` shall produce the value
19
  399268537.
20
 
21
  ``` cpp
22
+ using mt19937 =
23
+ mersenne_twister_engine<uint_fast32_t,
24
+ 32,624,397,31,0x9908b0df,11,0xffffffff,7,0x9d2c5680,15,0xefc60000,18,1812433253>;
25
  ```
26
 
27
  *Required behavior:* The $10000^{\,th}$ consecutive invocation of a
28
  default-constructed object of type `mt19937` shall produce the value
29
  4123659995.
30
 
31
  ``` cpp
32
+ using mt19937_64 =
33
+ mersenne_twister_engine<uint_fast64_t,
34
  64,312,156,31,0xb5026f5aa96619e9,29,
35
  0x5555555555555555,17,
36
  0x71d67fffeda60000,37,
37
  0xfff7eee000000000,43,
38
+ 6364136223846793005>;
 
39
  ```
40
 
41
  *Required behavior:* The $10000^{\,th}$ consecutive invocation of a
42
  default-constructed object of type `mt19937_64` shall produce the value
43
  9981545732273789042.
44
 
45
  ``` cpp
46
+ using ranlux24_base =
47
+ subtract_with_carry_engine<uint_fast32_t, 24, 10, 24>;
48
  ```
49
 
50
  *Required behavior:* The $10000^{\,th}$ consecutive invocation of a
51
  default-constructed object of type `ranlux24_base` shall produce the
52
  value 7937952.
53
 
54
  ``` cpp
55
+ using ranlux48_base =
56
+ subtract_with_carry_engine<uint_fast64_t, 48, 5, 12>;
57
  ```
58
 
59
  *Required behavior:* The $10000^{\,th}$ consecutive invocation of a
60
  default-constructed object of type `ranlux48_base` shall produce the
61
  value 61839128582725.
62
 
63
  ``` cpp
64
+ using ranlux24 = discard_block_engine<ranlux24_base, 223, 23>;
 
65
  ```
66
 
67
  *Required behavior:* The $10000^{\,th}$ consecutive invocation of a
68
  default-constructed object of type `ranlux24` shall produce the value
69
  9901578.
70
 
71
  ``` cpp
72
+ using ranlux48 = discard_block_engine<ranlux48_base, 389, 11>;
 
73
  ```
74
 
75
  *Required behavior:* The $10000^{\,th}$ consecutive invocation of a
76
  default-constructed object of type `ranlux48` shall produce the value
77
  249142670248501.
78
 
79
  ``` cpp
80
+ using knuth_b = shuffle_order_engine<minstd_rand0,256>;
 
81
  ```
82
 
83
  *Required behavior:* The $10000^{\,th}$ consecutive invocation of a
84
  default-constructed object of type `knuth_b` shall produce the value
85
  1112339016.
86
 
87
  ``` cpp
88
+ using default_random_engine = implementation-defined;
 
89
  ```
90
 
91
+ *Remarks:* The choice of engine type named by this `typedef` is
92
+ *implementation-defined*.
93
+
94
+ [*Note 1*: The implementation may select this type on the basis of
95
+ performance, size, quality, or any combination of such factors, so as to
96
+ provide at least acceptable engine behavior for relatively casual,
97
+ inexpert, and/or lightweight use. Because different implementations may
98
+ select different underlying engine types, code that uses this `typedef`
99
+ need not generate identical sequences across
100
+ implementations. — *end note*]
101