diff options
Diffstat (limited to 'examples/ThirdPartyLibs/Eigen/src/SVD/BDCSVD.h')
-rw-r--r-- | examples/ThirdPartyLibs/Eigen/src/SVD/BDCSVD.h | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/examples/ThirdPartyLibs/Eigen/src/SVD/BDCSVD.h b/examples/ThirdPartyLibs/Eigen/src/SVD/BDCSVD.h index 17f8e4436..a76a8dd04 100644 --- a/examples/ThirdPartyLibs/Eigen/src/SVD/BDCSVD.h +++ b/examples/ThirdPartyLibs/Eigen/src/SVD/BDCSVD.h @@ -27,6 +27,10 @@ #define eigen_internal_assert(X) assert(X); #endif +#ifdef EIGEN_BDCSVD_DEBUG_VERBOSE +#include <iostream> +#endif + namespace Eigen { #ifdef EIGEN_BDCSVD_DEBUG_VERBOSE @@ -172,7 +176,7 @@ public: void setSwitchSize(int s) { - eigen_assert(s>3 && "BDCSVD the size of the algo switch has to be greater than 3"); + eigen_assert(s>=3 && "BDCSVD the size of the algo switch has to be at least 3."); m_algoswap = s; } @@ -404,7 +408,7 @@ void BDCSVD<MatrixType>::structured_update(Block<MatrixXr,Dynamic,Dynamic> A, co //@param lastCol : The Index of the last column of the submatrix of m_computed and for m_naiveU; // lastCol + 1 - firstCol is the size of the submatrix. //@param firstRowW : The Index of the first row of the matrix W that we are to change. (see the reference paper section 1 for more information on W) -//@param firstRowW : Same as firstRowW with the column. +//@param firstColW : Same as firstRowW with the column. //@param shift : Each time one takes the left submatrix, one must add 1 to the shift. Why? Because! We actually want the last column of the U submatrix // to become the first column (*coeff) and to shift all the other columns to the right. There are more details on the reference paper. template<typename MatrixType> @@ -899,7 +903,7 @@ void BDCSVD<MatrixType>::computeSingVals(const ArrayRef& col0, const ArrayRef& d RealScalar fLeft = secularEq(leftShifted, col0, diag, perm, diagShifted, shift); eigen_internal_assert(fLeft<Literal(0)); -#if defined EIGEN_INTERNAL_DEBUGGING || defined EIGEN_BDCSVD_SANITY_CHECKS +#if defined EIGEN_BDCSVD_DEBUG_VERBOSE || defined EIGEN_BDCSVD_SANITY_CHECKS || defined EIGEN_INTERNAL_DEBUGGING RealScalar fRight = secularEq(rightShifted, col0, diag, perm, diagShifted, shift); #endif @@ -1242,8 +1246,8 @@ void BDCSVD<MatrixType>::deflation(Eigen::Index firstCol, Eigen::Index lastCol, #endif { // Check for total deflation - // If we have a total deflation, then we have to consider col0(0)==diag(0) as a singular value during sorting - bool total_deflation = (col0.tail(length-1).array()<considerZero).all(); + // If we have a total deflation, then we have to consider col0(0)==diag(0) as a singular value during sorting. + const bool total_deflation = (col0.tail(length-1).array().abs()<considerZero).all(); // Sort the diagonal entries, since diag(1:k-1) and diag(k:length) are already sorted, let's do a sorted merge. // First, compute the respective permutation. |