Returning an Eigen SparseMatrix from another function
I am writing a function to return a subset of the columns of a sparse matrix. The returned matrix is also sparse. For my first attempt, I first initialized a sparse matrix
Eigen::SparseMatrix<double> x_subset = col_sp(x, index)
with