tmp/tmpytb64ghw/{from.md → to.md}
RENAMED
|
@@ -8,11 +8,12 @@ state eᵢ of its base engine `e`; the size of the state is the size of
|
|
| 8 |
e’s state.
|
| 9 |
|
| 10 |
The transition and generation algorithms are described in terms of the
|
| 11 |
following integral constants:
|
| 12 |
|
| 13 |
-
The relation w = n₀ w₀ + (n - n₀)(w₀ + 1) always
|
|
|
|
| 14 |
|
| 15 |
The transition algorithm is carried out by invoking `e()` as often as
|
| 16 |
needed to obtain n₀ values less than y₀ + `e.min()` and n - n₀ values
|
| 17 |
less than y₁ + `e.min()` .
|
| 18 |
|
|
@@ -32,15 +33,14 @@ for (k = n₀; k \neq n; k += 1) {
|
|
| 32 |
}
|
| 33 |
```
|
| 34 |
|
| 35 |
``` cpp
|
| 36 |
template<class Engine, size_t w, class UIntType>
|
| 37 |
-
class independent_bits_engine
|
| 38 |
-
{
|
| 39 |
public:
|
| 40 |
// types
|
| 41 |
-
|
| 42 |
|
| 43 |
// engine characteristics
|
| 44 |
static constexpr result_type min() { return 0; }
|
| 45 |
static constexpr result_type max() { return 2^w - 1; }
|
| 46 |
|
|
|
|
| 8 |
e’s state.
|
| 9 |
|
| 10 |
The transition and generation algorithms are described in terms of the
|
| 11 |
following integral constants:
|
| 12 |
|
| 13 |
+
[*Note 1*: The relation w = n₀ w₀ + (n - n₀)(w₀ + 1) always
|
| 14 |
+
holds. — *end note*]
|
| 15 |
|
| 16 |
The transition algorithm is carried out by invoking `e()` as often as
|
| 17 |
needed to obtain n₀ values less than y₀ + `e.min()` and n - n₀ values
|
| 18 |
less than y₁ + `e.min()` .
|
| 19 |
|
|
|
|
| 33 |
}
|
| 34 |
```
|
| 35 |
|
| 36 |
``` cpp
|
| 37 |
template<class Engine, size_t w, class UIntType>
|
| 38 |
+
class independent_bits_engine {
|
|
|
|
| 39 |
public:
|
| 40 |
// types
|
| 41 |
+
using result_type = UIntType;
|
| 42 |
|
| 43 |
// engine characteristics
|
| 44 |
static constexpr result_type min() { return 0; }
|
| 45 |
static constexpr result_type max() { return 2^w - 1; }
|
| 46 |
|