def testApply(self): v1 = bdd.variable('v1') v2 = bdd.variable('v2') v1dv2 = bdd.disjunction(['v1', 'v2']) v1av2 = bdd.simplify( bdd.apply(v1, v2, bdd.orOperation, bdd.enumeratedVariablesOrdering(['v1', 'v2']))) self.assertEqual(v1dv2, v1av2)
def testApply(self): v1=bdd.variable('v1') v2=bdd.variable('v2') v1dv2=bdd.disjunction(['v1','v2']) v1av2=bdd.simplify(bdd.apply(v1,v2,bdd.orOperation,bdd.enumeratedVariablesOrdering(['v1','v2']))) self.assertEqual(v1dv2,v1av2)
def testSimplify(self): v1=bdd.Node('x1', bdd.redundantVariable('x2',bdd.Node.T), bdd.redundantVariable('x2',bdd.Node.T) ) self.assertEqual(id(bdd.simplify(v1)),id(bdd.Node.T))
def testSimplify(self): v1 = bdd.Node('x1', bdd.redundantVariable('x2', bdd.Node.T), bdd.redundantVariable('x2', bdd.Node.T)) self.assertEqual(id(bdd.simplify(v1)), id(bdd.Node.T))