std::discard_block_engine
STD::丢弃[医]块[医]发动机
Defined in header | | |
---|---|---|
template< class Engine, size_t P, size_t R > class discard_block_engine; | | (since C++11) |
discard_block_engine
是一个伪随机数产生器适配器,它丢弃由基本引擎产生的一定数量的数据。从每一块大小P
由基本引擎生成的适配器只保留R
数字,丢弃剩下的。
模板参数
Engine | - | the type of the wrapped engine |
---|---|---|
P | - | the size of a block. Must be greater than 0. |
R | - | the number of used numbers per block. Must be greater than 0 and not greater than P |
类型要求
发动机必须符合RandomNumberEngine的要求。
成员类型
Member type | Definition |
---|---|
result_type | Engine::result_type |
成员函数
(constructor) | constructs the engine adaptor (public member function) |
---|---|
seed | sets the state of the underlying engine (public member function) |
base | returns the underlying engine (public member function) |
世代
运算符%28%29提升基础引擎的状态,并返回生成值%28公共成员函数%29
丢弃将适配器%27s状态提升指定数量%28公共成员函数%29。
特征
敏静态获取基础引擎输出范围中的最小值。%28公共静态成员功能%29
马克斯静态获取基础引擎输出范围中的最大可能值。%28公共静态成员功能%29
非会员职能
operator==operator!= | compares the internal states of the adaptors and underlying engines (function) |
---|---|
operator<<operator>> | performs stream input and output on pseudo-random number engine adaptor (function) |
成员对象
constexpr size_t block_size static | the size of the block, P (public static member constant) |
---|---|
constexpr size_t used_size static | the number of used numbers per block, R (public static member constant) |
© cppreference.com
在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。