tmp/tmpgc8nbnna/{from.md → to.md}
RENAMED
|
@@ -14,10 +14,11 @@ state eⱼ to eⱼ₊₁.
|
|
| 14 |
|
| 15 |
The generation algorithm yields the value returned by the last
|
| 16 |
invocation of `e()` while advancing `e`’s state as described above.
|
| 17 |
|
| 18 |
``` cpp
|
|
|
|
| 19 |
template<class Engine, size_t p, size_t r>
|
| 20 |
class discard_block_engine {
|
| 21 |
public:
|
| 22 |
// types
|
| 23 |
using result_type = typename Engine::result_type;
|
|
@@ -36,21 +37,33 @@ template<class Engine, size_t p, size_t r>
|
|
| 36 |
template<class Sseq> explicit discard_block_engine(Sseq& q);
|
| 37 |
void seed();
|
| 38 |
void seed(result_type s);
|
| 39 |
template<class Sseq> void seed(Sseq& q);
|
| 40 |
|
|
|
|
|
|
|
|
|
|
| 41 |
// generating functions
|
| 42 |
result_type operator()();
|
| 43 |
void discard(unsigned long long z);
|
| 44 |
|
| 45 |
// property functions
|
| 46 |
-
const Engine& base() const noexcept { return e; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 47 |
|
| 48 |
private:
|
| 49 |
Engine e; // exposition only
|
| 50 |
-
|
| 51 |
};
|
|
|
|
| 52 |
```
|
| 53 |
|
| 54 |
The following relations shall hold: `0 < r` and `r <= p`.
|
| 55 |
|
| 56 |
The textual representation consists of the textual representation of `e`
|
|
|
|
| 14 |
|
| 15 |
The generation algorithm yields the value returned by the last
|
| 16 |
invocation of `e()` while advancing `e`’s state as described above.
|
| 17 |
|
| 18 |
``` cpp
|
| 19 |
+
namespace std {
|
| 20 |
template<class Engine, size_t p, size_t r>
|
| 21 |
class discard_block_engine {
|
| 22 |
public:
|
| 23 |
// types
|
| 24 |
using result_type = typename Engine::result_type;
|
|
|
|
| 37 |
template<class Sseq> explicit discard_block_engine(Sseq& q);
|
| 38 |
void seed();
|
| 39 |
void seed(result_type s);
|
| 40 |
template<class Sseq> void seed(Sseq& q);
|
| 41 |
|
| 42 |
+
// equality operators
|
| 43 |
+
friend bool operator==(const discard_block_engine& x, const discard_block_engine& y);
|
| 44 |
+
|
| 45 |
// generating functions
|
| 46 |
result_type operator()();
|
| 47 |
void discard(unsigned long long z);
|
| 48 |
|
| 49 |
// property functions
|
| 50 |
+
const Engine& base() const noexcept { return e; }
|
| 51 |
+
|
| 52 |
+
// inserters and extractors
|
| 53 |
+
template<class charT, class traits>
|
| 54 |
+
friend basic_ostream<charT, traits>&
|
| 55 |
+
operator<<(basic_ostream<charT, traits>& os, const discard_block_engine& x);
|
| 56 |
+
template<class charT, class traits>
|
| 57 |
+
friend basic_istream<charT, traits>&
|
| 58 |
+
operator>>(basic_istream<charT, traits>& is, discard_block_engine& x);
|
| 59 |
|
| 60 |
private:
|
| 61 |
Engine e; // exposition only
|
| 62 |
+
size_t n; // exposition only
|
| 63 |
};
|
| 64 |
+
}
|
| 65 |
```
|
| 66 |
|
| 67 |
The following relations shall hold: `0 < r` and `r <= p`.
|
| 68 |
|
| 69 |
The textual representation consists of the textual representation of `e`
|