public static void main (String[] args) { TestSuite theSuite; if (args.length > 0) { theSuite = new TestSuite (); for (int i = 0; i < args.length; i++) { theSuite.addTest (new TestAbstractBeliefPropagation (args[i])); } } else { theSuite = (TestSuite) suite (); } junit.textui.TestRunner.run (theSuite); }
public void testBadVariable () { FactorGraph fg = createBoltzmannChain (5); Assignment assn = fg.sampleContinuousVars (new Randoms (23423)); FactorGraph sliced = (FactorGraph) fg.slice (assn); Inferencer bp = new TRP (); bp.computeMarginals (sliced); try { bp.lookupMarginal (new Variable (2)); fail ("Expected exception"); } catch (IllegalArgumentException e) { // expected System.out.println ("OK: As expected, got exception "+e); } }
public void testBadVariable () { FactorGraph fg = createBoltzmannChain (5); Assignment assn = fg.sampleContinuousVars (new Randoms (23423)); FactorGraph sliced = (FactorGraph) fg.slice (assn); Inferencer bp = new TRP (); bp.computeMarginals (sliced); try { bp.lookupMarginal (new Variable (2)); fail ("Expected exception"); } catch (IllegalArgumentException e) { // expected System.out.println ("OK: As expected, got exception "+e); } }
public static void main (String[] args) { TestSuite theSuite; if (args.length > 0) { theSuite = new TestSuite (); for (int i = 0; i < args.length; i++) { theSuite.addTest (new TestAbstractBeliefPropagation (args[i])); } } else { theSuite = (TestSuite) suite (); } junit.textui.TestRunner.run (theSuite); }