Function sprs::binop::add_dense_mat_same_ordering
source · pub fn add_dense_mat_same_ordering<Lhs, Rhs, Res, Alpha, Beta, ByProd1, ByProd2, I, Iptr, Mat, D>(
lhs: &Mat,
rhs: &ArrayBase<D, Ix2>,
alpha: Alpha,
beta: Beta
) -> Array<Res, Ix2>where
Mat: SpMatView<Lhs, I, Iptr>,
D: Data<Elem = Rhs>,
Lhs: Zero,
Rhs: Zero,
Res: Zero + Copy,
for<'r> &'r Alpha: Mul<&'r Lhs, Output = ByProd1>,
for<'r> &'r Beta: Mul<&'r Rhs, Output = ByProd2>,
ByProd1: Add<ByProd2, Output = Res>,
I: SpIndex,
Iptr: SpIndex,
Expand description
Compute alpha * lhs + beta * rhs with lhs a sparse matrix and rhs dense and alpha and beta scalars
The matrices must have the same ordering, a CSR
matrix must be
added with a matrix with C
-like ordering, a CSC
matrix
must be added with a matrix with F
-like ordering.