Fix comments in ConditionEstimator and minor cleanup.

This commit is contained in:
Rasmus Munk Larsen
2016-04-01 11:58:17 -07:00
parent 1aa89fb855
commit 91414e0042
2 changed files with 65 additions and 58 deletions

View File

@@ -152,7 +152,7 @@ template<typename MatrixType> void lu_invertible()
VERIFY_IS_APPROX(m2, m1_inverse*m3);
// Test condition number estimation.
RealScalar rcond = RealScalar(1) / matrix_l1_norm(m1) / matrix_l1_norm(m1_inverse);
RealScalar rcond = (RealScalar(1) / matrix_l1_norm(m1)) / matrix_l1_norm(m1_inverse);
// Verify that the estimate is within a factor of 10 of the truth.
VERIFY(lu.rcond() > rcond / 10 && lu.rcond() < rcond * 10);
@@ -197,7 +197,7 @@ template<typename MatrixType> void lu_partial_piv()
VERIFY_IS_APPROX(m2, m1_inverse*m3);
// Test condition number estimation.
RealScalar rcond = RealScalar(1) / matrix_l1_norm(m1) / matrix_l1_norm(m1_inverse);
RealScalar rcond = (RealScalar(1) / matrix_l1_norm(m1)) / matrix_l1_norm(m1_inverse);
// Verify that the estimate is within a factor of 10 of the truth.
VERIFY(plu.rcond() > rcond / 10 && plu.rcond() < rcond * 10);