Skip to main content

spmv_ndarray

Function spmv_ndarray 

Source
pub fn spmv_ndarray<T: Scalar + Clone + Field>(
    a: &CsrMatrix<T>,
    x: &Array1<T>,
) -> Array1<T>
Expand description

Sparse matrix-vector multiplication: y = A * x

Computes the product of a CSR sparse matrix with a dense vector, returning a new dense Array1.

§Arguments

  • a - Sparse CSR matrix (m x n)
  • x - Dense input vector (length n)

§Returns

Dense output vector (length m)

§Panics

Panics if the vector length does not match the number of matrix columns.