Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to not include unused variables #12

Closed
asmeurer opened this issue Feb 21, 2014 · 1 comment
Closed

Ability to not include unused variables #12

asmeurer opened this issue Feb 21, 2014 · 1 comment
Labels
locked [bot] locked due to inactivity stale::closed [bot] closed after being marked as stale stale [bot] marked as stale due to inactivity type::feature request for a new feature or capability

Comments

@asmeurer
Copy link
Contributor

By default, if you skip variables, pycosat will include them in solutions, like

>>> list(pycosat.itersolve([[2]]))
[[-1, 2], [1, 2]]
>>> list(pycosat.itersolve([[3]]))
[[-1, -2, 3], [-1, 2, 3], [1, -2, 3], [1, 2, 3]]

This can be annoying, because if your literals end up larger than in order, you have to flatten them out or else you will get more solutions than you need. It would be nice to have an option to not include unused variables. Alternately, pycosat could have a helper function to flatten out something like [[2, 5, 6], [-2, 4, 6]] to [[1, 3, 4], [-1, 2, 4]].

@github-actions
Copy link

Hi there, thank you for your contribution!

This issue has been automatically marked as stale because it has not had recent activity. It will be closed automatically if no further activity occurs.

If you would like this issue to remain open please:

  1. Verify that you can still reproduce the issue at hand
  2. Comment that the issue is still reproducible and include:
    - What OS and version you reproduced the issue on
    - What steps you followed to reproduce the issue

NOTE: If this issue was closed prematurely, please leave a comment.

Thanks!

@github-actions github-actions bot added the stale [bot] marked as stale due to inactivity label Mar 15, 2022
@github-actions github-actions bot added the stale::closed [bot] closed after being marked as stale label May 14, 2022
@github-actions github-actions bot added the locked [bot] locked due to inactivity label May 14, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked [bot] locked due to inactivity stale::closed [bot] closed after being marked as stale stale [bot] marked as stale due to inactivity type::feature request for a new feature or capability
Projects
Archived in project
Development

No branches or pull requests

1 participant