What is rstan::extract_sparse_parts intended for?


#1

I notice that rstan has an extract_sparse_parts function; presumably this is for pre-processing a predictor matrix in some way to then make for more efficient computation in a model? Is there an example of its usage anywhere?


#2

Nevermind! I see now (after merely reading the help doc for rstan::extract_sparse_parts :P) that it’s intended for combination with csr_matrix_times_vector inside a stan model. Neat!