Skip to main content

sparse_matrix_trace

Function sparse_matrix_trace 

Source
pub fn sparse_matrix_trace<F>(a: &CsrMatrix<F>) -> F
where F: Float + NumAssign + Sum + SparseElement + Debug + 'static,
Expand description

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