A set of algorithms for Bayesian inference