8000 Fix 2SAT.md by dpaleka · Pull Request #1274 · cp-algorithms/cp-algorithms · GitHub
[go: up one dir, main page]

Skip to content

Fix 2SAT.md #1274

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

Merged
merged 2 commits into from
Jun 19, 2024
Merged

Fix 2SAT.md #1274

merged 2 commits into from
Jun 19, 2024

Conversation

dpaleka
Copy link
Contributor
@dpaleka dpaleka commented May 10, 2024

The existing code didn't work out of the box, and n was used for both the number of variables and the number of vertices in the graph.

The existing code didn't work out of the box, and `n` was used for two different numbers
Copy link
Contributor
github-actions bot commented Jun 9, 2024

Visit the preview URL for this PR (for commit 2fb1fdb):

https://cp-algorithms--preview-1274-jjsiblvx.web.app

(expires 2024-06-16T00:24:50.174049353Z)

Copy link
Member
@adamant-pwn adamant-pwn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the pull request! Please note that the code that you are changing is also covered by test_2sat.cpp. Could you please also fix either the code in the article, or the test itself, so that they're compatible with each other?

Also it would be great if you could also add a test to test_2sat.cpp, in which the old implementation would fail, but the new one wouldn't.

@dpaleka
Copy link
Contributor Author
dpaleka commented Jun 9, 2024

The old implementation is correct, but the way to use it in code did not correspond to my intuitive guess. I added the example_usage method now, and tested it in test_2sat.cpp.

Copy link
Contributor

Visit the preview URL for this PR (for commit a45e808):

https://cp-algorithms--preview-1274-jyfbqry4.web.app

(expires 2024-06-26T16:27:58.407608721Z)

@adamant-pwn
Copy link
Member

Thanks!

@adamant-pwn adamant-pwn merged commit d0f1a33 into cp-algorithms:master Jun 19, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
0