Search in sources :

Example 1 with Proposition

use of edu.cmu.tetrad.bayes.Proposition in project tetrad by cmu-phil.

the class TestProposition method testUpdate1.

/**
 * Richard's 2-variable example worked by hand.
 */
@Test
public void testUpdate1() {
    BayesIm bayesIm = sampleBayesIm2();
    Proposition prop1 = Proposition.tautology(bayesIm);
    prop1.removeCategory(0, 1);
    prop1.setVariable(1, false);
    Proposition prop2 = new Proposition(bayesIm, prop1);
    assertEquals(prop1, prop2);
    BayesIm bayesIm2 = new MlBayesIm(bayesIm);
    Proposition prop3 = new Proposition(bayesIm2, prop1);
    assertTrue(!prop3.equals(prop1));
}
Also used : MlBayesIm(edu.cmu.tetrad.bayes.MlBayesIm) BayesIm(edu.cmu.tetrad.bayes.BayesIm) MlBayesIm(edu.cmu.tetrad.bayes.MlBayesIm) Proposition(edu.cmu.tetrad.bayes.Proposition) Test(org.junit.Test)

Aggregations

BayesIm (edu.cmu.tetrad.bayes.BayesIm)1 MlBayesIm (edu.cmu.tetrad.bayes.MlBayesIm)1 Proposition (edu.cmu.tetrad.bayes.Proposition)1 Test (org.junit.Test)1