The page http://eigen.tuxfamily.org/dox/TutorialLinearAlgebra.html#TutorialLinAlgRankRevealing says:
> Certain decompositions are rank-revealing, i.e. are able to compute the rank of a matrix. These are typically also the decompositions that behave best in the face of a non-full-rank matrix (which in the square case means a singular matrix). On this table you can see for all our decompositions whether they are rank-revealing or not.
> Rank-revealing decompositions offer at least a rank() method.
The table is given at http://eigen.tuxfamily.org/dox/TopicLinearAlgebraDecompositions.html
Some of the decompositions given there that are claimed to be rank-revealing do not indeed have a rank() method, including e.g. SelfAdjointEigenSolver.
Right, I guess this concerns all eigenvalues related algorithms.
The correct link is now:
I think adding rank() should be comparatively easy. Fixing this also requires
adding setThreshold()/threshold() methods.
I'm not 100% sure about what to do with that entry. If I'm not mistaken, this only concerns eigenvalue decompositions, however, for them I really don't see the need for a rank() method. Perhaps we should rather update the documentation to completely split the table to better separate decompositions for linear solving and decomposition for eigenvalues problems. SVD would fit in the first category, even though it is highly related to the second...
Well, implementing this should be rather trivial -- but I see your point that this might encourage people to use this instead of simply using one of the pivoting QR-decompositions.
However, if someone needs an eigenvalue decomposition anyways, I see no reason to forbid extracting the rank (and kernel) of the matrix using this.
Perhaps, we can implement this, but warn in the documentation, that QR decomposition is much faster and SVD is more accurate if one needs to compute the rank of a matrix.
Alright, let's go for it.
-- 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/593.