diff options
author | David H. Bailey <anonymous@invalid.net> | 2011-05-23 11:20:13 +0200 |
---|---|---|
committer | David H. Bailey <anonymous@invalid.net> | 2011-05-23 11:20:13 +0200 |
commit | 074b067624e45c8e9f42f2347509d06d0d437226 (patch) | |
tree | e3c83271afbb175a05970b213aa841075a99cd4f /Eigen/src/QR | |
parent | 7209d6a12610d4682c65a99f12b0d0278fbbe81d (diff) |
fix implicit scalar conversions (needed to support fancy scalar types, see bug #276)
Diffstat (limited to 'Eigen/src/QR')
-rw-r--r-- | Eigen/src/QR/ColPivHouseholderQR.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Eigen/src/QR/ColPivHouseholderQR.h b/Eigen/src/QR/ColPivHouseholderQR.h index 6c7d1d486..8a81fa8ed 100644 --- a/Eigen/src/QR/ColPivHouseholderQR.h +++ b/Eigen/src/QR/ColPivHouseholderQR.h @@ -387,7 +387,7 @@ ColPivHouseholderQR<MatrixType>& ColPivHouseholderQR<MatrixType>::compute(const for(Index k = 0; k < cols; ++k) m_colSqNorms.coeffRef(k) = m_qr.col(k).squaredNorm(); - RealScalar threshold_helper = m_colSqNorms.maxCoeff() * internal::abs2(NumTraits<Scalar>::epsilon()) / rows; + RealScalar threshold_helper = m_colSqNorms.maxCoeff() * internal::abs2(NumTraits<Scalar>::epsilon()) / static_cast<double>(rows); m_nonzero_pivots = size; // the generic case is that in which all pivots are nonzero (invertible case) m_maxpivot = RealScalar(0); @@ -413,7 +413,7 @@ ColPivHouseholderQR<MatrixType>& ColPivHouseholderQR<MatrixType>::compute(const // Note that here, if we test instead for "biggest == 0", we get a failure every 1000 (or so) // repetitions of the unit test, with the result of solve() filled with large values of the order // of 1/(size*epsilon). - if(biggest_col_sq_norm < threshold_helper * (rows-k)) + if(biggest_col_sq_norm < threshold_helper * static_cast<double>(rows-k)) { m_nonzero_pivots = k; m_hCoeffs.tail(size-k).setZero(); |