gibbs one step sampling for mrfs