0

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.

Govind Chari
  • 9
  • 1
  • 2
  • Does this help you? https://stackoverflow.com/questions/75192340/how-do-i-initialize-a-eigen-sparse-matrix-with-a-values-innerindices-outersta/75192521#75192521 Eigen uses column indices, not column pointers – Homer512 Jul 28 '23 at 07:06

0 Answers0