Previous implementation would always write a coordinate file due to GraphBLAS iterators sometimes throwing GrB_NOT_IMPLEMENTED. Turns out that only throws when the matrix is GxB_BY_ROW, as Matrix Market requires column-major order and GraphBLAS appears to only support iterating on the native direction.
Note that this change is only efficient if the matrix is GxB_BY_COL as that is the only case where an iterator can be used. If the matrix is GxB_BY_ROW, then a full copy and sort is necessary, a very inefficient operation, but still better than writing a coordinate version of that matrix.
Previous implementation would always write a coordinate file due to GraphBLAS iterators sometimes throwing GrB_NOT_IMPLEMENTED. Turns out that only throws when the matrix is GxB_BY_ROW, as Matrix Market requires column-major order and GraphBLAS appears to only support iterating on the native direction.
Note that this change is only efficient if the matrix is GxB_BY_COL as that is the only case where an iterator can be used. If the matrix is GxB_BY_ROW, then a full copy and sort is necessary, a very inefficient operation, but still better than writing a coordinate version of that matrix.