Skip to main content

sparse_add

Function sparse_add 

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

Sparse matrix addition: C = alpha * A + beta * B.

Both A and B must have the same shape. The result is in CSR format.