Returns condition number of zero if matrix is not invertible.

This commit is contained in:
Antonio Sánchez
2025-02-12 07:09:20 +00:00
committed by Rasmus Munk Larsen
parent 809d266b49
commit becefd59e2
2 changed files with 31 additions and 3 deletions

View File

@@ -243,7 +243,10 @@ class FullPivLU : public SolverBase<FullPivLU<MatrixType_, PermutationIndex_> >
the LU decomposition.
*/
inline RealScalar rcond() const {
eigen_assert(m_isInitialized && "PartialPivLU is not initialized.");
eigen_assert(m_isInitialized && "FullPivLU is not initialized.");
if (!isInvertible()) {
return RealScalar(0);
}
return internal::rcond_estimate_helper(m_l1_norm, *this);
}