Create a list of vectors that represents a sparse matrix.
The Stan Math Library has a function called
which inputs a matrix in compressed row storage form and a dense vector and
returns their product without fillin. To use the
csr_matrix_times_vector function with a large
sparse matrix, it is optimal in terms of memory to simply pass the three vectors
that characterize the compressed row storage form of the matrix to the
data block of the Stan program.
extract_sparse_parts function provides a convenient means of
obtaining these vectors.
A named list with components
w A numeric vector containing the non-zero elements of
v An integer vector containing the column indices of the non-zero
u An integer vector indicating where in
w a given row's
non-zero values start.