operator<<,>>(std::independent_bits_engine)
来自cppreference.com
< cpp | numeric | random | independent bits engine
|
|
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
| template< class CharT, class Traits, class ResultType, class Engine, size_t w, class UIntType > |
(1) | (C++11 起) |
| template< class CharT, class Traits, class ResultType, class Engine, size_t w, class UIntType > |
(2) | (C++11 起) |
1)
序列的伪随机数作为一个序列由一个或多个空格隔开的十进制数的引擎适配器的内部状态,并把它插入到流
ost。填充字符和格式化标志的流被忽略,并且不会受到影响..... Original:
Serializes the internal state of the pseudo-random number engine adaptor as a sequence of decimal numbers separated by one or more spaces, and inserts it to the stream
ost. The fill character and the formatting flags of the stream are ignored and unaffected. The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
2)
恢复内部状态的伪随机数引擎适配器
e的序列化表示,这是由以前调用operator<<使用流具有相同一脉相承的语言环境和相同的CharT和Traits。如果无法反序列化的输入,e保持不变failbit上引发istOriginal:
Restores the internal state of the pseudo-random number engine adaptor
e from the serialized representation, which was created by an earlier call to operator<< using a stream with the same imbued locale and the same CharT and Traits. If the input cannot be deserialized, e is left unchanged and failbit is raised on istThe text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
如果被写入的文本表示使用os << x和该表示被恢复到相同的或不同的对象的相同的类型,使用
yis >> y,然后x==y.Original:
If a textual representation is written using os << x and that representation is restored into the same or a different object
y of the same type using is >> y, then x==y.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
| 本节是不完整的 原因: standard also defines what the textual representation consists of |
目录 |
[编辑] 参数
| ost | - | 将数据插入到输出流
Original: output stream to insert the data to The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
| ist | - | 输入的数据流中提取
Original: input stream to extract the data from The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
| e | - | 引擎适配器来序列化或还原
Original: engine adaptor to serialize or restore The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
[编辑] 返回值
1)
ost2)
ist[编辑] 复杂性
| 本节是不完整的 |
[编辑] 例外
1)
(无)
Original:
(none)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
2)
设置时,可能会引发std::ios::failure
failbitOriginal:
May throw std::ios::failure when setting
failbitThe text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.