How to wrap Eigen::SparseMatrix over preexistant 3-standard compress row/colum arrays

一世执手 提交于 2019-12-06 05:06:17

As ggael pointed out, you can use Eigen::MappedSparseMatrix for that.

The reason you can't just overwrite the internal pointers of a SparseMatrix is that this would cause problems when the SparseMatrix deallocates them, but you allocated them in a different way then Eigen does (and how Eigen internally allocates memory is an implementation detail you should not really rely on in your code).

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!