pub fn bandwidth(row_ptr: &[i32], col_idx: &[i32], n: usize) -> usize
Compute the bandwidth of a matrix given its CSR structure.
Bandwidth = max |i - j| over all nonzero entries (i, j).