Open giovannic opened 3 years ago
There's also the possibility for a different design. Something like:
diarrhoea_priors <- DoubleVectorVariable$new(matrix(0, ncol=4, nrow=parameters$population))
# in process...
priors <- diarrhoea_priors$current() # gets the current matrix
# process your priors
diarrhoea_priors$set_next(new_priors) # will update the priors matrix at the end of the timestep
DoubleVariables can only store one number per individual. But sometimes you want several numbers to represent a variable. So that you can access and update them together. e.g.
It would be much easier to write: