operator<<(std::uniform_int_distribution), operator>>(std::uniform_int_distribution)
Материал из cppreference.com
< cpp | numeric | random | uniform int distribution
|
|
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 > std::basic_ostream<CharT,Traits>& operator<<( std::basic_ostream<CharT,Traits>& ost, |
(1) | |
| template< class CharT, class Traits, class ResultType > std::basic_istream<CharT,Traits>& operator>>( std::basic_istream<CharT,Traits>& ist, |
(2) | |
Выполняет входного потока и вывода на псевдослучайных
1) d распределения числа.Original:
Performs stream input and output operations on pseudo-random number distribution
d.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) ost как текстовое представление. Форматирование флаги и заливки характер ost остаются неизменными.Original:
Writes a textual representation of the distribution parameters and internal state to
ost as textual representation. The formatting flags and fill character of ost are unchanged.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.
Восстановление параметров распределения и внутреннего состояния с данных, считанных из
ist. Форматирование флаги ist остаются неизменными. Данные должны быть написаны с использованием потока с той же местности, CharT и параметры Traits шаблон, в противном случае поведение не определено. Если плохой вход встречается, ist.setstate(std::ios::failbit) называется, который может бросить std::ios_base::failure. d остается неизменным в этом случае.Original:
Restores the distribution parameters and internal state with data read from
ist. The formatting flags of ist are unchanged. The data must have been written using a stream with the same locale, CharT and Traits template parameters, otherwise the behavior is undefined. If bad input is encountered, ist.setstate(std::ios::failbit) is called, which may throw std::ios_base::failure. d is unchanged in that case.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.
[править] Параметры
| 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. |
| d | - | псевдослучайных чисел распределения
Original: pseudo-random number distribution 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)(Нет)
2) 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.
может бросить std::ios_base::failure на плохой вход.
Original:
may throw std::ios_base::failure on bad input.
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.