List<Factor> factors = new ArrayList<Factor> (vars.size ());
// node factors
for (int i = 0; i < len; i++) {
double u = r.nextUniform (-4.0, 4.0);
factors.add (new BoltzmannUnaryFactor (vars.get (i), u));
}
// edge factors
for (int i = 0; i < len-1; i++) {