- 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
This commit is contained in:
Gael Guennebaud
2012-11-06 15:25:50 +01:00
parent 959ef37006
commit a76fbbf397
88 changed files with 496 additions and 468 deletions

View File

@@ -116,6 +116,7 @@ template<typename Scalar, int _UpLo, typename OrderingType>
template<typename _MatrixType>
void IncompleteCholesky<Scalar,_UpLo, OrderingType>::factorize(const _MatrixType& mat)
{
using std::sqrt;
eigen_assert(m_analysisIsOk && "analyzePattern() should be called first");
// FIXME Stability: We should probably compute the scaling factors and the shifts that are needed to ensure a succesful LLT factorization and an efficient preconditioner.
@@ -182,7 +183,7 @@ void IncompleteCholesky<Scalar,_UpLo, OrderingType>::factorize(const _MatrixType
m_info = NumericalIssue;
return;
}
RealScalar rdiag = internal::sqrt(RealScalar(diag));
RealScalar rdiag = sqrt(RealScalar(diag));
Scalar scal = Scalar(1)/rdiag;
vals[colPtr[j]] = rdiag;
// Insert the largest p elements in the matrix and scale them meanwhile

View File

@@ -129,7 +129,8 @@ class IterationController
bool converged() const { return m_res <= m_rhsn * m_resmax; }
bool converged(double nr)
{
m_res = internal::abs(nr);
using std::abs;
m_res = abs(nr);
m_resminreach = (std::min)(m_resminreach, m_res);
return converged();
}

View File

@@ -32,6 +32,7 @@ namespace Eigen {
const Preconditioner& precond, int& iters,
typename Dest::RealScalar& tol_error)
{
using std::sqrt;
typedef typename Dest::RealScalar RealScalar;
typedef typename Dest::Scalar Scalar;
typedef Matrix<Scalar,Dynamic,1> VectorType;