In COLAMDOrdering, line #140, colamd always returns "false" (failed) in case if matrix is in uncompressed format:
info = internal::colamd(m, n, Alen, A.data(), p.data(), knobs, stats);
Line #423 of colamd is always true ( need > Alen ).
"need" is computed based on number of non-zeros taken from outerIndexPtr()[cols()]
"Alen" is computed based on number of non-zeros returned by nonZeros().
As a result, for uncompressed matrices "need" is always greater than "Alen" - which disables ordering method. Can be seen only in "Debug" build, when assert is triggered.
The COLAMD implementation as provided in Eigen_Colamd.h assumes that the matrix is in compressed mode. If your matrix is in uncompressed format, outerIndexPtr() and innerIndexPtr() will return useless data for the algorithm.
Maybe we should put an assert in that case ?
I encountered this problem while using SparseQR for uncompressed matrix.
Does this mean that matrix _must_ be in compressed form for decompositions?
It might be a good idea to stress this fact in documentation (in SparseQR, LU).
It wasn't clear right (at least for me ;)).
-- 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/649.