MCPcopy Create free account
hub / github.com/RedisGraph/RedisGraph / RG_MatrixTupleIter_next_BOOL

Function RG_MatrixTupleIter_next_BOOL

src/graph/rg_matrix/rg_matrix_iter.c:170–200  ·  view source on GitHub ↗

advance iterator

Source from the content-addressed store, hash-verified

168
169// advance iterator
170GrB_Info RG_MatrixTupleIter_next_BOOL
171(
172 RG_MatrixTupleIter *iter, // iterator to consume
173 GrB_Index *row, // optional output row index
174 GrB_Index *col, // optional output column index
175 bool *val // optional value at A[row, col]
176) {
177 if(IS_DETACHED(iter)) return GrB_NULL_POINTER ;
178
179 GrB_Info info = GrB_SUCCESS ;
180 GrB_Matrix DM = RG_MATRIX_DELTA_MINUS(iter->A) ;
181 GxB_Iterator dp_it = &iter->dp_it ;
182
183 if(!iter->m_depleted) {
184 info = _next_m_iter_bool(iter, DM, row, col, val, &iter->m_depleted) ;
185 if(info == GrB_SUCCESS) return GrB_SUCCESS ;
186 }
187
188 if(iter->dp_depleted) {
189 return GxB_EXHAUSTED ;
190 }
191
192 if(row) *row = GxB_rowIterator_getRowIndex (dp_it) ;
193 if(col) *col = GxB_rowIterator_getColIndex (dp_it) ;
194 if(val) *val = GxB_Iterator_get_BOOL (dp_it) ;
195
196 // prep value for next iteration
197 _iter_next(dp_it, iter->max_row, &iter->dp_depleted);
198
199 return GrB_SUCCESS ;
200}
201
202// iterate over M matrix
203static GrB_Info _next_m_iter_uint64

Callers 8

Constraint_EnforceNodesFunction · 0.85
_Index_PopulateNodeIndexFunction · 0.85
Graph_DeleteNodesFunction · 0.85
Graph_GetNodeEdgesFunction · 0.85
Graph_GetNodeDegreeFunction · 0.85
Graph_GetNodeLabelsFunction · 0.85
NodeByLabelScanConsumeFunction · 0.85

Calls 5

_next_m_iter_boolFunction · 0.85
GxB_Iterator_get_BOOLFunction · 0.85
_iter_nextFunction · 0.85

Tested by

no test coverage detected