mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
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
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user