Skip to main content

sparse_trace

Function sparse_trace 

Source
pub fn sparse_trace<F>(a: &CsrMatrix<F>) -> F
where F: Float + SparseElement,
Expand description

Compute the trace of a CSR matrix (sum of diagonal elements).