本文整理汇总了Python中dd.bdd.BDD._min_free方法的典型用法代码示例。如果您正苦于以下问题:Python BDD._min_free方法的具体用法?Python BDD._min_free怎么用?Python BDD._min_free使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类dd.bdd.BDD
的用法示例。
在下文中一共展示了BDD._min_free方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: x_and_not_y
# 需要导入模块: from dd.bdd import BDD [as 别名]
# 或者: from dd.bdd.BDD import _min_free [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 _min_free [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