Is it possible to modify single value in std::discrete_distribution? I can't find a simple way of doing this. I was thinking of initializing it with std::vector with assigned probabilities and modifying it everytime I want, but reinitializing discrete_distribution everytime seems to be not the best idea.
You can't, there's no following function in std::discrete_distribution.
You can get probabilities, but not set, so, there is only one way - reinit discrete_distribuion
(probably you can use vector of predefined destributions).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With