std::seed_seq
提供: cppreference.com
![]() |
このページは、Google 翻訳を使って英語版から機械翻訳されました。
翻訳には誤りや奇妙な言い回しがあるかもしれません。文章の上にポインタをおくと、元の文章が見れます。誤りを修正して翻訳を改善する手助けをしてください。翻訳についての説明は、ここをクリックしてください。 |
Defined in header <random>
|
||
class seed_seq; |
(C++11およびそれ以降) | |
std::seed_seq
整数値のデータのシーケンスを消費し、符号なし整数の値を要求された数を生成i
、0 ≤ i < 232、消費されたデータに基づいています。生成された値は消費値が近接している場合であっても全体の32ビットの範囲に分布している.
Original:
std::seed_seq
consumes a sequence of integer-valued data and produces a requested number of unsigned integer values i
, 0 ≤ i < 232, based on the consumed data. The produced values are distributed over the entire 32-bit range even if the consumed values are close.
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.
それはシードの乱数エンジンの多数の小さな種子や種子、または不十分に分散初期シードシーケンスを与え、エントロピーの多くを必要とする発電機を固定する方法を提供しています.
Original:
It provides a way to seed a large number of random number engines or to seed a generator that requires a lot of entropy, given a small seed or a poorly distributed initial seed sequence.
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::seed_seq
SeedSequence
の要件を満たしています.Original:
std::seed_seq
meets the requirements of SeedSequence
.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.
[編集] メンバータイプ
メンバー·タイプ
Original: Member type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
Definition |
result_type
|
std::uint_least32_t |
[編集] メンバ関数
コンストラクトや種子のstd :: seed_seqオブジェクト Original: constructs and seeds the std::seed_seq object The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) | |
operator= (削除された) |
コピーではなくアサイン可能 Original: not copy-assignable The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) |
バイアス排除し、均等に分布し、32ビットの値を計算します Original: calculates the bias-eliminated, evenly distributed 32-bit values The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) | |
のstd :: seed_seqに格納された32ビット値の数を取得します Original: obtains the number of 32-bit values stored in std::seed_seq The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) | |
のstd :: seed_seqに格納された32ビット値を取得します Original: obtains the 32-bit values stored in std::seed_seq The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (パブリックメンバ関数) |
[編集] 例
このコードを実行します
#include <random> #include <iostream> int main() { std::seed_seq seq({1,2,3,4,5}); std::vector<std::uint32_t> seeds(10); seq.generate(seeds.begin(), seeds.end()); for(std::uint32_t n : seeds) std::cout << n << '\n'; }
出力:
4204997637 4246533866 1856049002 1129615051 690460811 1075771511 46783058 3904109078 1534123438 1495905678