diff options
author | Gael Guennebaud <g.gael@free.fr> | 2012-11-06 15:25:50 +0100 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2012-11-06 15:25:50 +0100 |
commit | a76fbbf39777827200455477a9e3557b6063913f (patch) | |
tree | 6a03f8fcb163fa2c3dc2267c52fd1204f5490309 /unsupported/Eigen/src/MatrixFunctions/MatrixFunction.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/MatrixFunction.h')
-rw-r--r-- | unsupported/Eigen/src/MatrixFunctions/MatrixFunction.h | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/unsupported/Eigen/src/MatrixFunctions/MatrixFunction.h b/unsupported/Eigen/src/MatrixFunctions/MatrixFunction.h index e87a28f6c..7d426640c 100644 --- a/unsupported/Eigen/src/MatrixFunctions/MatrixFunction.h +++ b/unsupported/Eigen/src/MatrixFunctions/MatrixFunction.h @@ -235,6 +235,7 @@ void MatrixFunction<MatrixType,AtomicType,1>::computeSchurDecomposition() template <typename MatrixType, typename AtomicType> void MatrixFunction<MatrixType,AtomicType,1>::partitionEigenvalues() { + using std::abs; const Index rows = m_T.rows(); VectorType diag = m_T.diagonal(); // contains eigenvalues of A @@ -251,14 +252,14 @@ void MatrixFunction<MatrixType,AtomicType,1>::partitionEigenvalues() // Look for other element to add to the set for (Index j=i+1; j<rows; ++j) { - if (internal::abs(diag(j) - diag(i)) <= separation() && std::find(qi->begin(), qi->end(), diag(j)) == qi->end()) { - typename ListOfClusters::iterator qj = findCluster(diag(j)); - if (qj == m_clusters.end()) { - qi->push_back(diag(j)); - } else { - qi->insert(qi->end(), qj->begin(), qj->end()); - m_clusters.erase(qj); - } + if (abs(diag(j) - diag(i)) <= separation() && std::find(qi->begin(), qi->end(), diag(j)) == qi->end()) { + typename ListOfClusters::iterator qj = findCluster(diag(j)); + if (qj == m_clusters.end()) { + qi->push_back(diag(j)); + } else { + qi->insert(qi->end(), qj->begin(), qj->end()); + m_clusters.erase(qj); + } } } } |