# std::discrete_distribution::probabilities

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. iota(C++11) accumulate inner_product adjacent_difference partial_sum

Pseudo-aleatoria de generación de números

`std::discrete_distribution`

 std::vector 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.

### [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.

### [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.

### [editar]Ejemplo

```#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`