On this page
C++ named requirements: RandomNumberEngineAdaptor (since C++11)
A RandomNumberEngineAdaptor is a RandomNumberEngine that transforms the output of another RandomNumberEngine, the latter of which is termed a base engine.
Requirements
Given
B
, a RandomNumberEngineb
, an object of typeB
A
, a RandomNumberEngineAdaptor, adaptingB
as a base enginea
, an object of typeA
function | semantics |
---|---|
A::A(); |
The base engine is initialized as if by its default constructor. |
bool operator==(const A& lhs, const A& rhs); |
Returns whether lhs 's base engine is equal to rhs 's base engine or not. |
A::A(result_type s); |
The base engine is initialized with s . |
template<class Sseq> A::A(Sseq& q); |
The base engine is initialized with q . |
void seed(); |
Invokes b.seed() . |
void seed(result_type s); |
Invokes b.seed(s) . |
template<class Sseq> void seed(Sseq& q); |
Invokes b.seed(q) . |
Furthermore
- The complexity of each function of
A
does not exceed the complexity of the function ofB
- The state of
A
includes the state ofB
- The size of
A
's state is no less than the size ofb
- Copying
A
's state includes copyingB
's state - The textual representation of
A
includes the textual representation ofB
Standard library
The following standard library facilities satisfy RandomNumberEngineAdaptor:
(C++11)
|
discards some output of a random number engine (class template) |
(C++11)
|
packs the output of a random number engine into blocks of a specified number of bits (class template) |
(C++11)
|
delivers the output of a random number engine in a different order (class template) |
© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
https://en.cppreference.com/w/cpp/named_req/RandomNumberEngineAdaptor