diff options
Diffstat (limited to 'graph/bronKerbosch.cpp')
| -rw-r--r-- | graph/bronKerbosch.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/graph/bronKerbosch.cpp b/graph/bronKerbosch.cpp index caf2421..ceeb668 100644 --- a/graph/bronKerbosch.cpp +++ b/graph/bronKerbosch.cpp @@ -9,7 +9,7 @@ void bronKerboschRec(bits R, bits P, bits X) { if (!P.any() && !X.any()) { cliques.push_back(R); } else { - int q = (P | X)._Find_first(); + int q = min(P._Find_first(), X._Find_first()); bits cands = P & ~adj[q]; for (int i = 0; i < sz(adj); i++) if (cands[i]){ R[i] = 1; |
