예제 #1
0
 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)
예제 #2
0
 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)
예제 #3
0
 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))
예제 #4
0
 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))