meelgroup / approxmc

Approximate Model Counter
Other
70 stars 26 forks source link

Mismatch between README example and pyapproxmc #37

Closed alvarna closed 1 year ago

alvarna commented 1 year ago

Hello,

I was using the python interface (pyapproxmc v 4.1.14) and trying to recreate the example in the README):

>>> from pyapproxmc import Counter
>>> s = Counter()
>>> s.add_clause([1, 2])
>>> cells, hashes = s.count()
>>> print("There are approx ", cells*2**hashes, " solutions")
There are 55 solutions, approximately

However, I get:

There are approx  3  solutions

Given that the number of variables is 2, and the single clause requiring 1 or 2 == True, 3 seems to be the right answer. Should I update this README as well, and add it to #36 ?

Thanks

msoos commented 1 year ago

Hi,

Thanks so much! Nice catch. The README was indeed wrong. I have now released a new version, with a new README:

https://github.com/meelgroup/approxmc/releases/tag/4.1.15

It should soon be automatically pushed to pypi and then it will hopefully have the right README there too :)

Thanks again for the heads up,

Mate