I know how to create a sparse matrix with Eigen by inserting the nonzero elements based on their rows and columns, then calling makeCompressed()
, but I already have the nonzero elements, and the row indices, and column pointers. Is there a way to directly initialize a sparse Eigen matrix with this data?
I tried looking at the Eigen documentation, but could not find anything there.