Addresses comments on Eigen pull request PR-174.

* Get rid of code-duplication for real vs. complex matrices.
* Fix flipped arguments to select.
* Make the condition estimation functions free functions.
* Use Vector::Unit() to generate canonical unit vectors.
* Misc. cleanup.
This commit is contained in:
Rasmus Munk Larsen
2016-04-04 14:20:01 -07:00
parent 30242b7565
commit 86e0ed81f8
7 changed files with 177 additions and 267 deletions

View File

@@ -237,7 +237,7 @@ template<typename _MatrixType> class FullPivLU
inline RealScalar rcond() const
{
eigen_assert(m_isInitialized && "PartialPivLU is not initialized.");
return ConditionEstimator<FullPivLU<_MatrixType> >::rcond(m_l1_norm, *this);
return ReciprocalConditionNumberEstimate(m_l1_norm, *this);
}
/** \returns the determinant of the matrix of which

View File

@@ -157,7 +157,7 @@ template<typename _MatrixType> class PartialPivLU
inline RealScalar rcond() const
{
eigen_assert(m_isInitialized && "PartialPivLU is not initialized.");
return ConditionEstimator<PartialPivLU<_MatrixType> >::rcond(m_l1_norm, *this);
return ReciprocalConditionNumberEstimate(m_l1_norm, *this);
}
/** \returns the inverse of the matrix of which *this is the LU decomposition.