Skip to content

Commit 5d99190

Browse files
allkcore: minor revisions to comments
1 parent e24e93c commit 5d99190

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

experimental/algorithm/LAGraph_AllKCore.c

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -130,25 +130,28 @@ int LAGraph_KCore_All
130130
//Assign values of deg into decomp (output)
131131
GRB_TRY (GrB_assign (*decomp, deg, NULL, level, GrB_ALL, n, GrB_NULL)) ;
132132

133-
int round = 0;
133+
// int round = 0;
134+
134135
// while q not empty
135-
while(nvals > 0){
136+
while (nvals > 0)
137+
{
136138
// Decrease todo by number of nvals
137139
todo = todo - nvals ;
138140
//add anything in q as true into the done list
139-
GRB_TRY (GrB_assign (done, q, NULL, (bool) true, GrB_ALL, n, GrB_DESC_S)) ; //structure to take care of 0-node cases
141+
//structure to take care of 0-node cases
142+
GRB_TRY (GrB_assign (done, q, NULL, (bool) true, GrB_ALL, n, GrB_DESC_S)) ;
140143

141144
// Create delta (the nodes who lost friends, and how many they lost)
142145
GRB_TRY (GrB_vxm (delta, GrB_NULL, GrB_NULL, semiring, q, A, GrB_NULL));
143146

144147
// Create new deg vector (keep anything not in done vector w/ replace command)
145-
GRB_TRY (GrB_eWiseAdd(deg, done, GrB_NULL, minus_op, deg, delta, GrB_DESC_RSC /* try GrB_DESC_RSC */)) ;
148+
GRB_TRY (GrB_eWiseAdd(deg, done, GrB_NULL, minus_op, deg, delta, GrB_DESC_RSC)) ;
146149

147150
// Update q, set new nvals
148151
GRB_TRY (GrB_select (q, GrB_NULL, GrB_NULL, valueLE, deg, level, GrB_NULL)) ;
149152

150153
GRB_TRY (GrB_Vector_nvals(&nvals, q)) ;
151-
round++;
154+
// round++;
152155
}
153156
}
154157
//set kmax

0 commit comments

Comments
 (0)