I have been looking for a while, but I just can't seem to find any implementation of the 2-Sat algorithm.
I am working in c++ with the boost library (which has a strongly connected component module) and need some guidance to either create an efficient 2-Sat program or find an existing library for me to utilise through c++.
I suppose you know how to model a 2-Sat problem to solve it with SCC. The way I handle vars and its negation isn't very elegant, but allows a short implementation: Given n variables numbered from 0 to n-1, in the clauses -i means the negation of variable i, and in the graph i+n means the same (am I clear ?)