diff options
author | Rasmus Munk Larsen <rmlarsen@google.com> | 2016-04-07 16:45:40 -0700 |
---|---|---|
committer | Rasmus Munk Larsen <rmlarsen@google.com> | 2016-04-07 16:45:40 -0700 |
commit | 283c51cd5edd5d706635b0bd05593f84cb8d618a (patch) | |
tree | 92fef65730fa0e84c304f209bb2f37b9e8e21426 | |
parent | d51803a728c95bf32ff9b920db95f5106749f719 (diff) |
Widen short-circuiting ReciprocalConditionNumberEstimate so we don't call InverseMatrixL1NormEstimate for dec.rows() <= 1.
-rw-r--r-- | Eigen/src/Core/ConditionEstimator.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Eigen/src/Core/ConditionEstimator.h b/Eigen/src/Core/ConditionEstimator.h index d7f6ef53d..c4c073fa2 100644 --- a/Eigen/src/Core/ConditionEstimator.h +++ b/Eigen/src/Core/ConditionEstimator.h @@ -66,7 +66,7 @@ typename Decomposition::RealScalar ReciprocalConditionNumberEstimate( eigen_assert(matrix.rows() == dec.rows()); eigen_assert(matrix.cols() == dec.cols()); eigen_assert(matrix.rows() == matrix.cols()); - if (dec.rows() == 0) { + if (dec.rows() <= 1) { return static_cast<typename Decomposition::RealScalar>(1); } return ReciprocalConditionNumberEstimate(MatrixL1Norm(matrix), dec); @@ -93,7 +93,7 @@ typename Decomposition::RealScalar ReciprocalConditionNumberEstimate( typename Decomposition::RealScalar matrix_norm, const Decomposition& dec) { typedef typename Decomposition::RealScalar RealScalar; eigen_assert(dec.rows() == dec.cols()); - if (dec.rows() == 0) { + if (dec.rows() <= 1) { return static_cast<RealScalar>(1); } if (matrix_norm == static_cast<RealScalar>(0)) { |