Espacios de nombres
Variantes
Acciones

std::discrete_distribution::discrete_distribution

De cppreference.com

 
 
Numéricos biblioteca
Funciones matemáticas comunes
Floating-point medio ambiente
Los números complejos
Matrices numéricas
Pseudo-aleatoria de generación de números
En tiempo de compilación aritmética racional (C++11)
Genéricos operaciones 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.
(C++11)
 
Pseudo-aleatoria de generación de números
Motores y 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.
Generadores
Original:
Generators
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Distribuciones
Original:
Distributions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Distribuciones 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.
Bernoulli distribuciones
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.
Poisson distribuciones
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.
Distribuciones 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.
Distribuciones de muestreo
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.
Secuencias de semillas
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.
(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.
 
std::discrete_distribution
Las funciones miembro
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
Generación
Original:
Generation
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
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.
Terceros funciones
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.
 
discrete_distribution();
(1) (desde C++11)
template< class InputIt >
discrete_distribution( InputIt first, InputIt last );
(2) (desde C++11)
discrete_distribution( std::initializer_list<double> weights );
(3) (desde C++11)
template< class UnaryOperation >

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

                       UnaryOperation unary_op );
(4) (desde C++11)
explicit discrete_distribution( const param_type& params );
(2) (desde C++11)
Construye un objeto nuevo reparto .
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)
Por defecto constructor. Construye la distribución con pesos. Esta distribución siempre 0 generar .
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)
Construye la distribución de pesos en el [first, last) rango. Si first == last, los efectos son los mismos que de la constructor predeterminado .
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)
Constructos de la distribución con los pesos en weights. Efectivamente llama 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)
Constructos de la distribución con pesos count que se generan utilizando unary_op función. Cada uno de los pesos es igual a w
i
= unary_op(xmin + δ/2 + i · δ)
, donde δ =
(xmax − xmin)
count
y i ∈ {0, ..., count−1}. xmin y xmax debe ser tal que δ > 0. Si count == 0 los efectos son los mismos que de la constructor predeterminado .
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)
Constructos de la distribución con params como los parámetros de distribución .
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 -
la gama de elementos que definen los números a utilizar como pesos. El tipo de los elementos mencionados por InputIterator debe ser convertible a 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 -
inicializador lista que contiene los 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 &.
El tipo Type debe ser tal que un objeto del tipo double puede ser derreferenciado y entonces convertido implícitamente a Type. The type Ret must be such that an object of type double can be dereferenced and assigned a value of type Ret. ​

params -
el parámetro de distribución establecido
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.
Requerimientos de tipo
-
InputIt debe reunir los requerimientos de InputIterator.