Expand description
Compressed Sparse Row (CSR) matrix format.
CSR is an efficient format for sparse matrices/graphs that enables:
- O(1) access to row start/end positions
- O(degree) iteration over neighbors
- Cache-friendly sequential access patterns
Memory layout:
row_ptr[i]= starting index in col_idx for row icol_idx[row_ptr[i]..row_ptr[i+1]]= column indices (neighbors) of row ivalues(optional) = edge weights
Structsยง
- CsrMatrix
- Compressed Sparse Row matrix for graph adjacency.
- CsrMatrix
Builder - Builder for CSR matrices.