public member function


vector<double> probabilities() const;
Returns a vector with the probabilities of each of the possible values the distribution can produce, from 0 to the vector's size.

The sequence of probabilities depend on the weights specified on construction: Each potential value is assigned a probability equal to its weight divided by the sum of all weights.

There is no way to retrieve the specific weights used on construction, but only the probabilities calculated in this way.

Each individual probability is in the range [0.0,1.0], and the sum of all probabilities is always 1.0.



Return value

A vector with the probabilities of each possible value, with the first element representing the probability of 0, and subsequent elements (if any) the probability of the subsequent integer values.



See also