Skip to content

Commit dd63765

Browse files
Fix wrong assertions in RPQ-matrix kleene stars
This patch fixes wrong assertions in the RPQ-matrix algorithm implementation. Some of them expected null whereas there should be non-null values. Some of them had copy-paste errors within the consistency checks.
1 parent 0a60b53 commit dd63765

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

experimental/algorithm/LAGraph_RPQMatrix.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -172,14 +172,14 @@ static GrB_Info LAGraph_RpqMatrixKleene(RpqMatrixPlan *plan, char *msg)
172172
static GrB_Info LAGraph_RpqMatrixKleene_L(RpqMatrixPlan *plan, char *msg)
173173
{
174174
LG_ASSERT(plan != NULL, GrB_NULL_POINTER);
175-
LG_ASSERT(plan->op == RPQ_MATRIX_OP_KLEENE, GrB_INVALID_VALUE);
175+
LG_ASSERT(plan->op == RPQ_MATRIX_OP_KLEENE_L, GrB_INVALID_VALUE);
176176
LG_ASSERT(plan->res_mat == NULL, GrB_INVALID_VALUE);
177177

178178
RpqMatrixPlan *lhs = plan->lhs;
179179
RpqMatrixPlan *rhs = plan->rhs;
180180

181-
LG_ASSERT(lhs == NULL, GrB_NULL_POINTER);
182-
LG_ASSERT(rhs == NULL, GrB_NULL_POINTER);
181+
LG_ASSERT(lhs != NULL, GrB_NULL_POINTER);
182+
LG_ASSERT(rhs != NULL, GrB_NULL_POINTER);
183183

184184
OK(LAGraph_RPQMatrix(rhs, msg));
185185
OK(LAGraph_RPQMatrix(lhs, msg));
@@ -244,7 +244,7 @@ static GrB_Info LAGraph_RpqMatrixKleene_L(RpqMatrixPlan *plan, char *msg)
244244
static GrB_Info LAGraph_RpqMatrixKleene_R(RpqMatrixPlan *plan, char *msg)
245245
{
246246
LG_ASSERT(plan != NULL, GrB_NULL_POINTER);
247-
LG_ASSERT(plan->op == RPQ_MATRIX_OP_KLEENE, GrB_INVALID_VALUE);
247+
LG_ASSERT(plan->op == RPQ_MATRIX_OP_KLEENE_R, GrB_INVALID_VALUE);
248248
LG_ASSERT(plan->res_mat == NULL, GrB_INVALID_VALUE);
249249

250250
RpqMatrixPlan *lhs = plan->lhs;

0 commit comments

Comments
 (0)