Diferencia entre revisiones de «cpp/numeric/random/discrete distribution/probabilities»
De cppreference.com
< cpp | numeric | random | discrete distribution
m (1 revisión: Translate from the English version) |
m (Use {{lc}}. Update links. Various fixes.) |
||
(No se muestran 2 ediciones intermedias realizadas por un usuario) | |||
Línea 2: | Línea 2: | ||
{{cpp/numeric/random/discrete_distribution/title | probabilities}} | {{cpp/numeric/random/discrete_distribution/title | probabilities}} | ||
{{cpp/numeric/random/discrete_distribution/navbar}} | {{cpp/numeric/random/discrete_distribution/navbar}} | ||
− | {{ | + | {{begin}} |
− | {{ | + | {{| =c++11 |1= |
std::vector<double> probabilities() const; | std::vector<double> probabilities() const; | ||
}} | }} | ||
− | {{ | + | {{end}} |
{{tr|Obtiene un {{c|std::vector<double>}} que contiene las probabilidades individuales de cada número entero que se generan por esta distribución .|Obtains a {{c|std::vector<double>}} containing the individual probabilities of each integer that is generated by this distribution.}} | {{tr|Obtiene un {{c|std::vector<double>}} que contiene las probabilidades individuales de cada número entero que se generan por esta distribución .|Obtains a {{c|std::vector<double>}} containing the individual probabilities of each integer that is generated by this distribution.}} | ||
Línea 33: | Línea 33: | ||
0.4 0.1 0.1 0.4 | 0.4 0.1 0.1 0.4 | ||
}} | }} | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ |
Última revisión de 05:27 2 jul 2013
![]() |
Esta página se ha traducido por ordenador/computador/computadora de la versión en inglés de la Wiki usando Google Translate.
La traducción puede contener errores y palabras aparatosas/incorrectas. Planea sobre el texto para ver la versión original. Puedes ayudar a corregir los errores y mejorar la traducción. Para instrucciones haz clic aquí. |
std::vector<double> probabilities() const; |
(desde C++11) | |
Obtiene un std::vector<double> que contiene las probabilidades individuales de cada número entero que se generan por esta distribución .
Original:
Obtains a std::vector<double> containing the individual probabilities of each integer that is generated by this distribution.
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.
[editar] Parámetros
(Ninguno)
Original:
(none)
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.
[editar] Valor de retorno
Un objeto de std::vector<double> tipo
Original:
An object of type std::vector<double>
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.
[editar] Ejemplo
Ejecuta este código
#include <iostream> #include <vector> #include <random> int main() { std::discrete_distribution<> d({40, 10, 10, 40}); std::vector<double> p = d.probabilities(); for(auto n : p) std::cout << n << ' '; std::cout << '\n'; }
Salida:
0.4 0.1 0.1 0.4