* SatClauseHashFunction
Added to the same file as SatLiteralHashFunction.
* clang-format
Thanks Andres!
#include <sstream>
#include <string>
+#include <unordered_set>
#include <vector>
namespace CVC4 {
*/
typedef std::vector<SatLiteral> SatClause;
+struct SatClauseSetHashFunction
+{
+ inline size_t operator()(
+ const std::unordered_set<SatLiteral, SatLiteralHashFunction>& clause)
+ const
+ {
+ size_t acc = 0;
+ for (const auto& l : clause)
+ {
+ acc ^= l.hash();
+ }
+ return acc;
+ }
+};
+
/**
* Each object in the SAT solver, such as as variables and clauses, can be assigned a life span,
* so that the SAT solver can (or should) remove them when the lifespan is over.