sparsity_pattern

Function sparsity_pattern 

Source
pub fn sparsity_pattern<T>(matrix: &CsrMatrix<T>) -> Vec<Vec<usize>>
where T: Clone + Copy + Zero + PartialEq,
Expand description

Calculate the sparsity pattern of a matrix

§Arguments

  • matrix - Sparse matrix

§Returns

  • Vector of vectors representing the sparsity pattern (1 for non-zero, 0 for zero)