本文整理匯總了Python中dd.bdd.BDD._succ[u]方法的典型用法代碼示例。如果您正苦於以下問題:Python BDD._succ[u]方法的具體用法?Python BDD._succ[u]怎麽用?Python BDD._succ[u]使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類dd.bdd.BDD
的用法示例。
在下文中一共展示了BDD._succ[u]方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: x_and_not_y
# 需要導入模塊: from dd.bdd import BDD [as 別名]
# 或者: from dd.bdd.BDD import _succ[u] [as 別名]
def x_and_not_y():
# remember:
# 2 = !(x & !y)
# -2 = x & !y
ordering = {'x': 0, 'y': 1}
g = BDD(ordering)
u = 3
v = -1
w = 1
t = (1, v, w)
g._succ[u] = t
g._pred[t] = u
g._ref[abs(v)] += 1
g._ref[abs(w)] += 1
g._ref[abs(u)] = 0
u = 2
v = 1
w = 3
t = (0, v, w)
g._succ[u] = t
g._pred[t] = u
g._ref[abs(v)] += 1
g._ref[abs(w)] += 1
g._ref[abs(u)] = 0
g._min_free = 4
return g
示例2: two_vars_xy
# 需要導入模塊: from dd.bdd import BDD [as 別名]
# 或者: from dd.bdd.BDD import _succ[u] [as 別名]
def two_vars_xy():
ordering = {'x': 0, 'y': 1}
g = BDD(ordering)
u = 2
t = (0, -1, 1)
g._succ[u] = t
g._pred[t] = u
g._ref[u] = 1
u = 3
t = (1, -1, 1)
g._succ[u] = t
g._pred[t] = u
g._ref[u] = 1
g._min_free = u + 1
return g