Skip to content

Commit

Permalink
Fix compilation of example/queens
Browse files Browse the repository at this point in the history
  • Loading branch information
SSoelvsten committed Nov 28, 2023
1 parent 2bc9306 commit 9a7e828
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions docs/example/queens.md
Original file line number Diff line number Diff line change
Expand Up @@ -238,11 +238,11 @@ uint64_t n_queens_list(uint64_t N, uint64_t column,

// Obtain the lexicographically minimal true assignment. Well, only one
// exists, so we get the only one left.
adiar::bdd_satmin(restricted_constraints, [&N, &partial_assignment](adiar::bdd::label_t x, bool v) {
adiar::bdd_satmin(restricted_constraints, [&N, &partial_assignment](adiar::pair<adiar::bdd::label_t, bool> xv) {
// Skip all empty (false) locations
if (!v) { return; }
if (!xv.second) { return; }

partial_assignment.at(j_of_label(N, x)) = i_of_label(N, x);
partial_assignment.at(j_of_label(N, xv.first)) = i_of_label(N, xv.first);
});

n_queens_print_solution(partial_assignment);
Expand Down
6 changes: 3 additions & 3 deletions example/queens.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -268,11 +268,11 @@ uint64_t n_queens_list(uint64_t N, uint64_t column,

// Obtain the lexicographically minimal true assignment. Well, only one
// exists, so we get the only one left.
adiar::bdd_satmin(restricted_constraints, [&N, &partial_assignment](adiar::bdd::label_type x, bool v) {
adiar::bdd_satmin(restricted_constraints, [&N, &partial_assignment](adiar::pair<adiar::bdd::label_type, bool> xv) {
// Skip all empty (false) locations
if (!v) { return; }
if (!xv.second) { return; }

partial_assignment.at(j_of_label(N, x)) = i_of_label(N, x);
partial_assignment.at(j_of_label(N, xv.first)) = i_of_label(N, xv.first);
});

n_queens_print_solution(partial_assignment);
Expand Down

0 comments on commit 9a7e828

Please sign in to comment.