|
nxpp
Header-only graph utilities on top of Boost Graph Library
|
2-SAT helper utilities built on top of the graph wrapper. More...
#include <boost/graph/adjacency_list.hpp>#include <boost/graph/strong_components.hpp>#include <utility>#include <vector>

Go to the source code of this file.
Functions | |
| int | nxpp::to_2sat_vertex_id (int literal) |
| Converts a signed 2-SAT literal into the internal implication-graph vertex ID. | |
| bool | nxpp::two_sat_satisfiable (int num_variables, const std::vector< std::pair< int, int > > &clauses) |
| Returns whether a 2-SAT instance is satisfiable. | |
2-SAT helper utilities built on top of the graph wrapper.
|
inline |
Returns whether a 2-SAT instance is satisfiable.
| num_variables | Number of Boolean variables in the instance. |
| clauses | Vector of (x, y) clauses representing (x OR y). |
References nxpp::to_2sat_vertex_id(), and nxpp::two_sat_satisfiable().
Referenced by nxpp::two_sat_satisfiable().