Skip to content

Commit e9f9df1

Browse files
committed
Fix bug in BK algorithm implementation
1 parent 9dfffb3 commit e9f9df1

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

contrib/mmts/bkb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ static void findMaximumIndependentSet(NodeList* cur, NodeList* result, nodemask_
9393
cur->size -= 1;
9494
ne += 1;
9595
if (k > 1) {
96-
for (s = ++ne; !BIT_CHECK(graph[fixp], oldSet[s]); s++);
96+
for (s = ne; !BIT_CHECK(graph[fixp], oldSet[s]); s++);
9797
}
9898
}
9999
}

contrib/mmts/bkbtest.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@
55
int main() {
66
nodemask_t matrix[64] = {0};
77
nodemask_t clique;
8+
int clique_size;
89
matrix[0] = 6;
910
matrix[1] = 4;
1011
matrix[2] = 1;
1112
matrix[4] = 3;
12-
clique = MtmFindMaxClique(matrix, 64);
13+
clique = MtmFindMaxClique(matrix, 64, &clique_size);
1314
printf("Clique=%lx\n", clique);
1415
return 0;
1516
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy