# Génération de nombres pseudo-aléatoires

< cpp‎ | numeric

Bibliothèque Numerics
Fonctions mathématiques courantes
Virgule flottante environnement
Nombres complexes
Tableaux numériques
La génération de nombres pseudo-aléatoires
Moment de la compilation arithmétique rationnelle (C++11)
Génériques des opérations numériques
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
 partial_sum

La génération de nombres pseudo-aléatoires
Les moteurs et les adaptateurs de moteur
Original:
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)
 independent_bits_engine (C++11)
 shuffle_order_engine (C++11)
Générateurs
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)
Les distributions
Original:
Distributions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Distributions uniformes
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)
Distributions de Bernoulli
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)
Distributions de Poisson
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)
Les distributions normales
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)
Distributions d'échantillonnage
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)
Séquences de semences
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)
Bibliothèque 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

La bibliothèque de nombres aléatoires fournit un ensemble de générateurs (tous étant des générateurs de nombres pseudo-aléatoires, qui génèrent des séquences de nombres entiers avec une répartition uniforme, et de véritables générateurs de nombres aléatoires si possible) ainsi qu'un ensemble de classes de distribution aléatoires de nombres qui convertissent une distribution uniforme d'un générateur en différentes distributions statistiques.

Tous les générateurs peuvent être spécifiquement utilisés avec une graine, sérialisés et désérialisés pour des utilisations à répétition.

## Sommaire

### [modifier]Générateurs de nombres aléatoires

Les générateurs de nombres aléatoires génèrent des nombres pseudo-aléatoires en utilisant des données-graines (seed data) comme source d'entropie. Plusieurs classes d'algorithmes de génération de nombres pseudo-aléatoires sont implémentées sous forme de modèles (template) qui peuvent être personnalisés.

Le choix du moteur à utiliser implique un certain nombre de compromis : le moteur de congruence linéaire est modérément rapide et a une occupation mémoire très faible pour sauvegarder son état. Les générateurs Fibonacci décalés sont très rapides, même sur les processeurs sans jeux d'instructions arithmétiques avancés, au détriment d'une occupation mémoire plus importante et parfois des caractéristiques spectrales moins intéressantes. Le Mersenne Twister est plus lent et a la plus grande occupation mémoire, mais avec les bons paramètres il a séquence sans répétition la plus longue et avec de bonnes caractéristiques spectrales (pour une définition donnée de bonne) .
Original:
The choice of which engine to use involves a number of tradeoffs: the linear congruential engine is moderately fast and has a very small storage requirement for state. The lagged Fibonacci generators are very fast even on processors without advanced arithmetic instruction sets, at the expense of greater state storage and sometimes less desirable spectral characteristics. The Mersenne twister is slower and has greater state storage requirements but with the right parameters has the longest non-repeating sequence with the most desirable spectral characteristics (for a given definition of desirable).
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
 Defined in header `` linear_congruential_engine (C++11) met en œuvre l'algorithme congruence linéaire Original: implements congruence linéaire algorithm The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (classe générique) mersenne_twister_engine (C++11) met en œuvre l'algorithme Mersenne twister Original: implements Mersenne twister algorithm The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (classe générique) subtract_with_carry_engine (C++11) outils soustraire à effectuer (une retardée de Fibonacci) algorithme Original: implements subtract with carry (a retardée de Fibonacci) algorithm The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (classe générique)

Aléatoires adaptateurs moteur nombre de générer nombres pseudo-aléatoires en utilisant un autre moteur de nombre aléatoire comme source d'entropie. Ils sont généralement utilisés pour modifier les caractéristiques spectrales du moteur sous-jacent .
Original:
Random number engine adaptors generate pseudo-random numbers using another random number engine as entropy source. They are generally used to alter the spectral characteristics of the underlying engine.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
 Defined in header `` discard_block_engine (C++11) supprime certains de sortie d'un moteur de nombres aléatoires Original: discards some output of a random number engine The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (classe générique) independent_bits_engine (C++11) emballe la sortie d'un moteur à nombre aléatoire en blocs d'un nombre déterminé de bits Original: packs the output of a random number engine into blocks of specified number of bits The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (classe générique) shuffle_order_engine (C++11) délivre en sortie d'un moteur de nombres aléatoires dans un ordre différent Original: delivers the output of a random number engine in different order The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (classe générique)

### [modifier]Prédéfinis générateurs de nombres aléatoires

Plusieurs algorithmes spécifiques populaires sont prédéfinis .
Original:
Several specific popular algorithms are predefined.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
 Defined in header `` Type d' Original: Type The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. Definition `minstd_rand0` std::linear_congruential_engine `minstd_rand` std::linear_congruential_engine `mt19937` std::mersenne_twister_engine `mt19937_64` std::mersenne_twister_engine `ranlux24_base` std::subtract_with_carry_engine `ranlux48_base` std::subtract_with_carry_engine `ranlux24` std::discard_block_engine `ranlux48` std::discard_block_engine `knuth_b` std::shuffle_order_engine `default_random_engine` ' Définie par l'implémentationOriginal: implementation-definedThe text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions.
 random_device non-déterministe générateur de nombres aléatoires en utilisant la source d'entropie matérielle Original: non-deterministic random number generator using hardware entropy source The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (classe)

### [modifier]Distributions de nombres aléatoires

Distributions de nombres aléatoires sont post-traitement de la sortie d'un moteur à nombre aléatoire ou des adaptateurs, de telle sorte que la sortie qui en résulte est réparti sur une fonction définie probabilité statistique densité .
Original:
Random number distributions are post-process the output of an random number engine or adaptors in such a way that resulting output is distributed on a defined statistical probability density function.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Defined in header `<random>`
##### Distributions uniformesOriginal: Uniform distributionsThe text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions.
produit des valeurs entières uniformément distribués dans une zone
Original:
produces integer values evenly distributed across a range
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(classe générique)
produit des valeurs réelles uniformément distribués dans une zone
Original:
produces real values evenly distributed across a range
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(classe générique) 
répartit uniformément les valeurs réelles de la précision donnée dans [0, 1)
Original:
evenly distributes real values of given precision across [0, 1)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(fonction générique) 
##### Distributions de BernoulliOriginal: Bernoulli distributionsThe text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions.
produit des valeurs bool sur un Distribution de Bernoulli .
Original:
produces bool values on a Distribution de Bernoulli.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(classe)
produit des valeurs entières sur un distribution binomiale .
Original:
produces integer values on a distribution binomiale.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(classe générique)
produit des valeurs entières sur un distribution binomiale négative .
Original:
produces integer values on a distribution binomiale négative.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(classe générique)
produit des valeurs entières sur un la distribution géométrique .
Original:
produces integer values on a la distribution géométrique.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(classe générique)
##### Distributions de PoissonOriginal: Poisson distributionsThe text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions.
produit des valeurs entières sur un distribution de Poisson .
Original:
produces integer values on a distribution de Poisson.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(classe générique)
produit des valeurs réelles sur un distribution exponentielle .
Original:
produces real values on an distribution exponentielle.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(classe générique)
produit des valeurs réelles sur un distribution gamma .
Original:
produces real values on an distribution gamma.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(classe générique)
produit des valeurs réelles sur un Distribution de Weibull .
Original:
produces real values on a Distribution de Weibull.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(classe générique)
produit des valeurs réelles sur un distribution des valeurs extrêmes .
Original:
produces real values on an distribution des valeurs extrêmes.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(classe générique)
##### Les distributions normalesOriginal: Normal distributionsThe text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions.
produit des valeurs réelles sur un normale standard (gaussienne) .
Original:
produces real values on a normale standard (gaussienne).
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(classe générique)
produit des valeurs réelles sur un distribution log-normale .
Original:
produces real values on a distribution log-normale.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(classe générique)
produit des valeurs réelles sur un la distribution du chi-carré .
Original:
produces real values on a la distribution du chi-carré.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(classe générique)
produit des valeurs réelles sur un Distribution de Cauchy .
Original:
produces real values on a Distribution de Cauchy.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(classe générique)
produit des valeurs réelles sur un Fisher F-distribution .
Original:
produces real values on a Fisher F-distribution.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(classe générique)
produit des valeurs réelles sur un T de Student distribution .
Original:
produces real values on a T de Student distribution.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(classe générique)
##### Distributions d'échantillonnageOriginal: Sampling distributionsThe text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions.
produit des nombres entiers aléatoires sur une distribution discrète .
Original:
produces random integers on a discrete distribution.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(classe générique)
produit des valeurs réelles réparties sur sous-intervalles constants .
Original:
produces real values distributed on constant subintervals.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(classe générique)
produit des valeurs réelles réparties sur sous-intervalles définis .
Original:
produces real values distributed on defined subintervals.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(classe générique)

### [modifier]Générateurs de séquences prédéfinies de semences

 Defined in header `` seed_seq (C++11) usage général biais d'éliminer brouillés générateur de séquence de semences Original: general-purpose bias-eliminating scrambled seed sequence generator The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (classe)

### [modifier]Bibliothèque C

 Defined in header `` rand génère un nombre pseudo-aléatoire Original: generates a pseudo-random number The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (fonction)  srand initialise générateur de nombre pseudo-aléatoireOriginal: initializes pseudo-random number generatorThe text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (fonction)  RAND_MAX valeur maximale possible générée par std::randOriginal: maximum possible value generated by std::randThe text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (constante macro)