How to prevent coupling in Rcpp Gibbs sampler
I am writing a Gibbs sampler using Rcpp. I’m sampling many parameters in various structure: scalar, vector, matrix, so I defined a class “Model” to save all objects at each state. The class contains a member function to initialize, and a member function to update the current state according to data and the previous state.