Some code sharing between C++ mcmc stochastic and mcmc batch