I cannot find much documentation of the Boost version of discrete_distribution. After much Google searching, I still can't even find a list of methods that this class has, and whether any of them function to re-assign the probabilities.
In my case, I am writing an evolutionary dynamics algorithm. At each time step, members of the population can be randomly selected to either die or reproduce. Because of this, the total number of entries within my discrete distribution will change almost every iteration.
I want to have a single object that I define before the simulation starts, called gillespie_dist
(the discrete distribution governing this Gillespie algorithm). But I want, at the end of each iteration, to potentially change specific values and/or add new values to gillespie_dist
and specifically do not want to create new instances of the discrete_distribution every iteration.
What is a good approach for this. Are there methods for pushing a new value onto the discrete_distribution
object, methods for changing a distribution's value at a particular index, or better yet, somehow "re-initializing" the entire distribution using the vector iterator idea mentioned here?