// Send all messages in random order.
ArrayList factors = new ArrayList (mdl.factors());
Collections.shuffle (factors, rand);
for (Iterator it = factors.iterator(); it.hasNext();) {
Factor factor = (Factor) it.next();
for (Iterator vit = factor.varSet ().iterator (); vit.hasNext ();) {
Variable from = (Variable) vit.next ();
sendMessage (mdl, from, factor);
}
}