This is an old version, view current version.

8.3 Sparse matrix arithmetic

8.3.1 Sparse matrix multiplication

The only supported operation is the multiplication of a sparse matrix A and a dense vector b to produce a dense vector Ab. Multiplying a dense row vector b and a sparse matrix A can be coded using transposition as bA=(Ab), but care must be taken to represent A rather than A as a sparse matrix.

vector csr_matrix_times_vector(int m, int n, vector w, array[] int v, array[] int u, vector b)
Multiply the m×n matrix represented by values w, column indices v, and row start indices u by the vector b; see compressed row storage.
Available since 2.18