Comment #13 on issue 1545 by Vinzent.Steinberg: Efficient data
representation in logic.satisfiable()
http://code.google.com/p/sympy/issues/detail?id=1545
+ raise ValueError, 'incompatible resolutors'
This should be 'raise ValueError(...). I know, your patch does not
introduce this,
but I just spotted it. :)
+ if p == True:
+ return True
+ elif p == None:
+ result = None
Would it make sense to use 'is' instead of '==' here for a slight
performance
improvement?
In [1]: %timeit True == False
10000000 loops, best of 3: 99.6 ns per loop
In [2]: %timeit True is False
10000000 loops, best of 3: 84.7 ns per loop
- assert dpll_satisfiable( (~A | B) & (~B | A) ) == {A: True, B: True}
- assert dpll_satisfiable( (A | B) & (~B | C) ) == {A: True, B: False}
+ assert dpll_satisfiable( (~A | B) & (~B | A) ) in ({A: True, B: True},
{A:
False, B:False})
+ assert dpll_satisfiable( (A | B) & (~B | C) ) in ({A: True, B: False},
{A: True,
C:True})
Why was this change necessary?
I'm positive about all the changes.
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
--
You received this message because you are subscribed to the Google Groups
"sympy-issues" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sympy-issues?hl=en.