#pragma once #include #include #include #include "circuit.h" class Clause { public: int satisfied_lit_count; int weight; static ll total_cost; std::vector lits; void update_satisfied_lit_count(); }; namespace ClauseLS { extern int num_vars; extern int num_clauses; extern std::vector clauses; extern std::vector *lit_related_clauses; extern int *lit_value; extern int *CC; extern int *score; extern std::unordered_set satisfied_clauses; extern std::unordered_set falsified_clauses; void init_data_structs(Circuit* circuit); void reset_data_structs(); void add_to_tmp_clause(int x); void build_clauses(Circuit* circuit); void write_cnf(); void flip(int var); }