Added Gibbs sampling for inference in a Bayesian network