diff options
author | 2012-11-06 15:25:50 +0100 | |
---|---|---|
committer | 2012-11-06 15:25:50 +0100 | |
commit | a76fbbf39777827200455477a9e3557b6063913f (patch) | |
tree | 6a03f8fcb163fa2c3dc2267c52fd1204f5490309 /unsupported/Eigen/src/MatrixFunctions/MatrixSquareRoot.h | |
parent | 959ef37006e60f68b9a9e667bf9da2e14eb0e8af (diff) |
Fix bug #314:
- remove most of the metaprogramming kung fu in MathFunctions.h (only keep functions that differs from the std)
- remove the overloads for array expression that were in the std namespace
Diffstat (limited to 'unsupported/Eigen/src/MatrixFunctions/MatrixSquareRoot.h')
-rw-r--r-- | unsupported/Eigen/src/MatrixFunctions/MatrixSquareRoot.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/unsupported/Eigen/src/MatrixFunctions/MatrixSquareRoot.h b/unsupported/Eigen/src/MatrixFunctions/MatrixSquareRoot.h index 3786510c0..abbf64096 100644 --- a/unsupported/Eigen/src/MatrixFunctions/MatrixSquareRoot.h +++ b/unsupported/Eigen/src/MatrixFunctions/MatrixSquareRoot.h @@ -99,11 +99,12 @@ template <typename MatrixType> void MatrixSquareRootQuasiTriangular<MatrixType>::computeDiagonalPartOfSqrt(MatrixType& sqrtT, const MatrixType& T) { + using std::sqrt; const Index size = m_A.rows(); for (Index i = 0; i < size; i++) { if (i == size - 1 || T.coeff(i+1, i) == 0) { eigen_assert(T(i,i) > 0); - sqrtT.coeffRef(i,i) = internal::sqrt(T.coeff(i,i)); + sqrtT.coeffRef(i,i) = sqrt(T.coeff(i,i)); } else { compute2x2diagonalBlock(sqrtT, T, i); @@ -289,6 +290,7 @@ template <typename MatrixType> template <typename ResultType> void MatrixSquareRootTriangular<MatrixType>::compute(ResultType &result) { + using std::sqrt; // Compute Schur decomposition of m_A const ComplexSchur<MatrixType> schurOfA(m_A); const MatrixType& T = schurOfA.matrixT(); @@ -299,7 +301,7 @@ void MatrixSquareRootTriangular<MatrixType>::compute(ResultType &result) result.resize(m_A.rows(), m_A.cols()); typedef typename MatrixType::Index Index; for (Index i = 0; i < m_A.rows(); i++) { - result.coeffRef(i,i) = internal::sqrt(T.coeff(i,i)); + result.coeffRef(i,i) = sqrt(T.coeff(i,i)); } for (Index j = 1; j < m_A.cols(); j++) { for (Index i = j-1; i >= 0; i--) { |