operator<<,>>(std::independent_bits_engine)

来自cppreference.com

 
 
Numerics的图书馆
常见的数学函数
浮点环境
复数
数字阵列
伪随机数生成
编译时合理的算法 (C++11)
通用的数值运算
Original:
Generic numeric operations
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
iota(C++11)
accumulate
inner_product
adjacent_difference
partial_sum
 
伪随机数生成
发动机和引擎适配器
Original:
Engines and engine adaptors
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
linear_congruential_engine(C++11)
mersenne_twister_engine(C++11)
subtract_with_carry_engine(C++11)
discard_block_engine(C++11)
independent_bits_engine(C++11)
shuffle_order_engine(C++11)
发电机
Original:
Generators
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
random_device(C++11)
分布
Original:
Distributions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
均匀分布
Original:
Uniform distributions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
uniform_int_distribution(C++11)
uniform_real_distribution(C++11)
generate_canonical(C++11)
伯努里分布
Original:
Bernoulli distributions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
bernoulli_distribution(C++11)
binomial_distribution(C++11)
negative_binomial_distribution(C++11)
geometric_distribution(C++11)
泊松分布
Original:
Poisson distributions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
poisson_distribution(C++11)
exponential_distribution(C++11)
gamma_distribution(C++11)
weibull_distribution(C++11)
extreme_value_distribution(C++11)
正态分布
Original:
Normal distributions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
normal_distribution(C++11)
lognormal_distribution(C++11)
chi_squared_distribution(C++11)
cauchy_distribution(C++11)
fisher_f_distribution(C++11)
student_t_distribution(C++11)
抽样分布
Original:
Sampling distributions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
discrete_distribution(C++11)
piecewise_constant_distribution(C++11)
piecewise_linear_distribution(C++11)
种子序列
Original:
Seed Sequences
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
seed_seq(C++11)
C库
Original:
C library
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
rand
srand
RAND_MAX
 
std::independent_bits_engine
成员函数
Original:
Member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
independent_bits_engine::independent_bits_engine
independent_bits_engine::seed
independent_bits_engine::base
Original:
Generation
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
independent_bits_engine::operator()
independent_bits_engine::discard
特性
Original:
Characteristics
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
independent_bits_engine::min
independent_bits_engine::max
非成员函数
Original:
Non-member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
operator==
operator!=
operator<<
operator>>
 
template< class CharT, class Traits, class ResultType,

          class Engine, size_t w, class UIntType >
std::basic_ostream<CharT,Traits>&
    operator<<( std::basic_ostream<CharT,Traits>& ost,

                const independent_bits_engine<Engine,w,UIntType>& e );
(1) (C++11 起)
template< class CharT, class Traits, class ResultType,

          class Engine, size_t w, class UIntType >
std::basic_istream<CharT,Traits>&
    operator>>( std::basic_istream<CharT,Traits>& ist,

                independent_bits_engine<Engine,w,UIntType>& e );
(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.
2)
恢复内部状态的伪随机数引擎适配器e的序列化表示,这是由以前调用operator<<使用流具有相同一脉相承的语言环境和相同的CharTTraits。如果无法反序列化的输入,e保持不变failbit上引发ist
Original:
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 ist
The text has been machine-translated via Google Translate.
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.

目录

[编辑] 参数

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) ost
2) 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.
2)
设置时,可能会引发std::ios::failurefailbit
Original:
May throw std::ios::failure when setting failbit
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.