Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitbd41d9e

Browse files
knizhnikkelvich
authored andcommitted
Fix bug in BK algorithm implementation
1 parentacb0ab6 commitbd41d9e

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

‎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
}

‎bkbtest.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@
55
intmain() {
66
nodemask_tmatrix[64]= {0};
77
nodemask_tclique;
8+
intclique_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
return0;
1516
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp