std::independent_bits_engine
科技促进发展:独立[医]位元[医]发动机
Defined in header | | |
---|---|---|
template< class Engine, std::size_t W, class UIntType > class independent_bits_engine; | | (since C++11) |
independent_bits_engine
是一个随机数引擎适配器,它产生与包装引擎不同位数的随机数。
模板参数
Engine | - | the type of the wrapped engine |
---|---|---|
W | - | the number of bits the generated numbers should have |
UIntType | - | the type of the generated random numbers. The type must be unsigned integral type. |
类型要求
发动机必须符合RandomNumberEngine的要求。
-W必须大于零,且不大于STD::数值[医]限值<UIntType>*数字。
成员类型
Member type | Definition |
---|---|
result_type | UIntType |
成员函数
(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
马克斯静态获取输出范围%28始终为2w-1%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) |
© cppreference.com
在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。