use of edu.cmu.tetrad.bayes.Evidence in project tetrad by cmu-phil.
the class TestEvidence method testUpdate1.
/**
* Richard's 2-variable example worked by hand.
*/
@Test
public void testUpdate1() {
BayesIm bayesIm = sampleBayesIm2();
Evidence evidence = Evidence.tautology(bayesIm);
evidence.getProposition().removeCategory(0, 1);
evidence.getProposition().setVariable(1, false);
evidence.setManipulated(0, true);
Evidence evidence2 = new Evidence(evidence, bayesIm);
assertEquals(evidence2, evidence);
assertEquals(evidence, new Evidence(evidence));
BayesIm bayesIm2 = new MlBayesIm(bayesIm);
Evidence evidence3 = new Evidence(evidence, bayesIm2);
assertTrue(!(evidence3.equals(evidence2)));
}