private static void addSlicedPotentials (FactorGraph fromMdl, FactorGraph toMdl, Assignment assn, Map toSlicedMap)
{
Set inputVars = new THashSet (Arrays.asList (assn.getVars ()));
Set remainingVars = new THashSet (fromMdl.variablesSet ());
remainingVars.removeAll (inputVars);
for (Iterator it = fromMdl.factorsIterator (); it.hasNext ();) {
Factor ptl = (Factor) it.next ();
Set theseVars = new THashSet (ptl.varSet ());
theseVars.retainAll (remainingVars);
Factor slicedPtl = ptl.slice (assn);