Skip to main content

Module csc

Module csc 

Source
Expand description

CSC (Compressed Sparse Column) sparse layout element lookup.

The column analog of CSR (docs/spec/layouts/csc.md): within a column, the stored row indices are strictly increasing, so a non-zero is found by binary-searching the column’s slice of row_indices. Mirrors the standalone-function API validated by super::csf::element_offset.

Functions§

element_offset
Looks up the storage offset (values / row_indices buffer index) of logical index (row, col) in a CSC matrix, or returns None if the element is a structural zero.