std::seed_seq
De cppreference.com
![]() |
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. |
Déclaré dans l'en-tête <random>
|
||
class seed_seq; |
(depuis C++11) | |
std::seed_seq
consomme une séquence de valeurs entières de données et produit un nombre requis de i
des entiers non signés, 0 ≤ i < 232, sur la base des données consommées. Les valeurs produites sont réparties sur toute la plage de 32-bit, même si les valeurs sont proches consommées .
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.
Il fournit un moyen pour ensemencer un grand nombre de moteurs de nombres aléatoires ou un générateur de semences qui nécessite beaucoup d'entropie, étant donné une petite graine ou une séquence de graines mal réparties initiale .
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
répond aux exigences de 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.
[modifier] Types de membres
Type du membre | Définition |
result_type
|
std::uint_least32_t |
[modifier] Fonctions membres
constructions et les graines de l'objet 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. (fonction membre publique) | |
operator= ( supprimée )Original: deleted The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
pas de copier-cessible 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. (fonction membre publique) |
calcule les préjugés éliminés, en répartissant les valeurs 32 bits 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. (fonction membre publique) | |
obtient le nombre de valeurs 32 bits stockées dans std :: seed_seq 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. (fonction membre publique) | |
obtient les valeurs 32-bits stockés dans std :: seed_seq 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. (fonction membre publique) |
[modifier] Exemple
#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'; }
Résultat :
4204997637 4246533866 1856049002 1129615051 690460811 1075771511 46783058 3904109078 1534123438 1495905678