lundi 21 juin 2021

How to generate N random float values in the range [0, 1] where the sum of all of them is 1? [closed]

How to generate N random float values in the range [0, 1] where the sum of all of them is 1?

I need it in an std::vector using C++11.

This is for probabilities purposes.




Aucun commentaire:

Enregistrer un commentaire