Espaces de noms
Variantes
Affichages
Actions

std::discrete_distribution::discrete_distribution

De cppreference.com

 
 
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
adjacent_difference
partial_sum
 
La génération de nombres pseudo-aléatoires
Les moteurs et les adaptateurs de moteur
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)
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
 
std::discrete_distribution
Les fonctions membres
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.
discrete_distribution::discrete_distribution
discrete_distribution::reset
Génération
Original:
Generation
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
discrete_distribution::operator()
Caractéristiques
Original:
Characteristics
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
discrete_distribution::probabilities
discrete_distribution::param
discrete_distribution::min
discrete_distribution::max
Tiers fonctions
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>>
 
discrete_distribution();
(1) (depuis C++11)
template< class InputIt >
discrete_distribution( InputIt first, InputIt last );
(2) (depuis C++11)
discrete_distribution( std::initializer_list<double> weights );
(3) (depuis C++11)
template< class UnaryOperation >

discrete_distribution( std::size_t count, double xmin, double xmax,

                       UnaryOperation unary_op );
(4) (depuis C++11)
explicit discrete_distribution( const param_type& params );
(2) (depuis C++11)
Construit un objet nouvelle distribution .
Original:
Constructs a new distribution object.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
1)
Constructeur par défaut. Construit avec la distribution poids. Cette distribution sera toujours 0 générer .
Original:
Default constructor. Constructs the distribution with weights . This distribution will always generate 0.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
2)
Construit avec la répartition des poids dans la gamme [first, last). Si first == last, les effets sont les mêmes que sur le constructeur par défaut .
Original:
Constructs the distribution with weights in the range [first, last). If first == last, the effects are the same as of the default constructor.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
3)
Construit avec la répartition des poids dans weights. Appelle effectivement initializer_list(weigths.begin(), weights.end()) .
Original:
Constructs the distribution with weights in weights. Effectively calls initializer_list(weigths.begin(), weights.end()).
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
4)
Construit avec la distribution des poids count qui sont générés à l'aide unary_op fonction. Chacun des poids est égale à w
i
= unary_op(xmin + δ/2 + i · δ)
, où δ =
(xmax − xmin)
count
et i ∈ {0, ..., count−1}. xmin et xmax doit être telle que δ > 0. Si count == 0 les effets sont les mêmes que sur le constructeur par défaut .
Original:
Constructs the distribution with count weights that are generated using function unary_op. Each of the weights is equal to w
i
= unary_op(xmin + δ/2 + i · δ)
, where δ =
(xmax − xmin)
count
and i ∈ {0, ..., count−1}. xmin and xmax must be such that δ > 0. If count == 0 the effects are the same as of the default constructor.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
5)
Construit avec la distribution params que les paramètres de la distribution .
Original:
Constructs the distribution with params as the distribution parameters.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[modifier] Paramètres

first, last -
la plage d'éléments définissant les numéros à utiliser comme coefficients de pondération. Le type des éléments visés par InputIterator doit être convertible en double
Original:
the range of elements defining the numbers to use as weights. The type of the elements referred by InputIterator must be convertible to double
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
weights -
liste d'initialisation contenant les poids
Original:
initializer list containing the weights
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
unary_op - unary operation function object that will be applied.

The signature of the function should be equivalent to the following:

 Ret fun(const Type &a);

The signature does not need to have const &.
The type  Type must be such that an object of type double can be dereferenced and then implicitly converted to  Type. The type  Ret must be such that an object of type double can be dereferenced and assigned a value of type  Ret. ​

params -
le paramètre de distribution défini
Original:
the distribution parameter set
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Type requirements
-
InputIt must meet the requirements of InputIterator.