renamed MPGraph to FactorGraph as it can also support Gibbs Sampling etc.