Skip to main content

sparse_identity

Function sparse_identity 

Source
pub fn sparse_identity(n: usize) -> (Vec<usize>, Vec<usize>, Vec<f64>)
Expand description

Construct the CSR representation of an n x n identity matrix.

Returns (row_offsets, col_indices, values).