num::sparse_matvec¶
Defined in header <linear/sparse/sparse.hpp>
Sparse matrix-vector product \(\mathbf{y} \leftarrow A \mathbf{x}\) in \(\mathcal{O}(\text{nnz})\) time.
Parameters¶
A: Compressed Sparse Row (CSR) matrix.x: Input vector of dimension \(A.\text{cols()}\).y: Output vector of dimension \(A.\text{rows()}\).
Exceptions¶
std::invalid_argument: If dimensions do not match.