Espaços nominais
Variantes
Acções

std::discrete_distribution::discrete_distribution

Da cppreference.com

 
 
Biblioteca numéricos
Funções matemáticas comuns
De ponto flutuante ambiente
Números complexos
Matrizes numéricas
Pseudo-aleatório de geração de números
Tempo de compilação aritmética racional (C++11)
Genéricos operações numéricas
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
 
Pseudo-aleatório de geração de números
Motores e adaptadores de motor
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)
Geradores
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)
Distribuições
Original:
Distributions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Distribuições 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)
Distribuições 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)
Distribuições 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)
Distribuições normais
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)
Distribuições de amostragem
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)
Seqüências de sementes
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)
C biblioteca
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
Funções de membro
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
Geração
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()
Características
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
Não-membros funções
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) (a partir do C++ 11)
template< class InputIt >
discrete_distribution( InputIt first, InputIt last );
(2) (a partir do C++ 11)
discrete_distribution( std::initializer_list<double> weights );
(3) (a partir do C++ 11)
template< class UnaryOperation >

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

                       UnaryOperation unary_op );
(4) (a partir do C++ 11)
explicit discrete_distribution( const param_type& params );
(2) (a partir do C++ 11)
Constrói um objeto de distribuição novo.
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)
Construtor padrão. Constrói a distribuição com pesos. Esta distribuição será sempre gerar 0.
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)
Constrói a distribuição de pesos no intervalo [first, last). Se first == last, os efeitos são os mesmos do construtor padrão.
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)
Constrói a distribuição de pesos em weights. Efetivamente chama 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)
Constrói a distribuição de pesos count que são gerados usando unary_op função. Cada um dos pesos é igual a w
i
= unary_op(xmin + δ/2 + i · δ)
, onde δ =
(xmax − xmin)
count
e i ∈ {0, ..., count−1}. xmin xmax e deve ser tal que δ > 0. Se count == 0 os efeitos são os mesmos do construtor padrão.
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)
Constrói a distribuição com params como os parâmetros de distribuição.
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.

[editar] Parâmetros

first, last -
a gama de elementos que definem o número de usar como pesos. O tipo dos elementos referidos por InputIterator deve ser conversível para 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 -
lista de inicializador contendo os pesos
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 -
o parâmetro de distribuição definido
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.