Implementation of algorithms in "Local Computations with Probabilities on Graphical Structures"