Module sprs::binop

source ·
Expand description

Sparse matrix addition, subtraction

Functions

  • Compute alpha * lhs + beta * rhs with lhs a sparse matrix and rhs dense and alpha and beta scalars
  • Applies a binary operation to matching non-zero elements of two sparse matrices. When e.g. only the lhs has a non-zero at a given location, 0 is inferred for the non-zero value of the other matrix. Both matrices should have the same storage.
  • Raw implementation of sparse/dense binary operations with the same ordering
  • Raw implementation of scalar binary operation for compressed sparse matrices sharing the same storage. The output arrays are assumed to be preallocated
  • Binary operations for CsVec
  • Compute coeff wise alpha * lhs * rhs with lhs a sparse matrix, rhs a dense matrix, and alpha a scalar
  • Sparse matrix scalar multiplication, with same storage type