You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GrB_Matrix_new and GrB_Vector_new should allow any or all dimensions of a matrix or vector to be zero. MATLAB, Python, and Julia all allow for this, and if GraphBLAS is to be used in such languages, it must support them. Empty matrices of size, say, 10-by-0 or 0-by-10, are important.
Example: say an algorithm searches a graph for nodes with a particular property, and wishes to return an INT64 GrB_Vector with a list of those k nodes. If no nodes are found, k is zero and the vector has length zero.
Suppose the set of neighbors of these k nodes is to be computed, one set per node. Then C = A (list,:) can be created using a list of such nodes. If the list is empty, C is 0-by-n, which is the correct answer and correct dimension of C.
There are many such examples. Empty matrices and vectors allow for clean handling of edge conditions in an algorithm. This issue should be considered for the v2.1 release.
The text was updated successfully, but these errors were encountered:
GrB_Matrix_new and GrB_Vector_new should allow any or all dimensions of a matrix or vector to be zero. MATLAB, Python, and Julia all allow for this, and if GraphBLAS is to be used in such languages, it must support them. Empty matrices of size, say, 10-by-0 or 0-by-10, are important.
Example: say an algorithm searches a graph for nodes with a particular property, and wishes to return an INT64 GrB_Vector with a list of those k nodes. If no nodes are found, k is zero and the vector has length zero.
Suppose the set of neighbors of these k nodes is to be computed, one set per node. Then C = A (list,:) can be created using a list of such nodes. If the list is empty, C is 0-by-n, which is the correct answer and correct dimension of C.
There are many such examples. Empty matrices and vectors allow for clean handling of edge conditions in an algorithm. This issue should be considered for the v2.1 release.
The text was updated successfully, but these errors were encountered: