31 const std::vector<std::vector<Literal>>& literal_tuples,
32 const std::vector<Literal>& line_literals) {
34 CHECK_EQ(literal_tuples.size(), line_literals.size());
35 const int num_tuples = line_literals.size();
36 if (num_tuples == 0)
return;
37 const int tuple_size = literal_tuples[0].size();
38 if (tuple_size == 0)
return;
39 for (
int i = 1;
i < num_tuples; ++
i) {
40 CHECK_EQ(tuple_size, literal_tuples[
i].
size());
43 absl::flat_hash_map<LiteralIndex, std::vector<LiteralIndex>>
44 line_literals_per_literal;
45 for (
int i = 0;
i < num_tuples; ++
i) {
46 const LiteralIndex selected_index = line_literals[
i].Index();
47 for (
const Literal l : literal_tuples[
i]) {
48 line_literals_per_literal[l.Index()].push_back(selected_index);
54 for (
int i = 0;
i < num_tuples; ++
i) {
55 const Literal line_is_selected = line_literals[
i];
66 for (
const auto& p : line_literals_per_literal) {
67 std::vector<Literal> clause;
68 for (
const auto&
index : p.second) {