In SparseMatrix.h, function reserveInnerVectors90, line 294, change: Index count = 0; for(Index j=0; j<m_outerSize; ++j) { newOuterIndex[j] = count; count += reserveSizes[j] + (m_outerIndex[j+1]-m_outerIndex[j]); totalReserveSize += reserveSizes[j]; } m_data.reserve(totalReserveSize); to: for(Index j=0; j<m_outerSize; ++j) { newOuterIndex[j] = totalReserveSize; totalReserveSize += reserveSizes[j]; } m_data.reserve(totalReserveSize); Please enhance this function to support rowmajor matrices as well.
-- GitLab Migration Automatic Message -- This bug has been migrated to gitlab.com's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.com/libeigen/eigen/issues/629.