Fix bug #314: move remaining math functions from internal to numext namespace

This commit is contained in:
Gael Guennebaud
2013-06-10 23:40:56 +02:00
parent 827843bbbd
commit 62670c83a0
71 changed files with 408 additions and 388 deletions

View File

@@ -63,7 +63,7 @@ void conjugate_gradient(const MatrixType& mat, const Rhs& rhs, Dest& x,
p = precond.solve(residual); //initial search direction
VectorType z(n), tmp(n);
RealScalar absNew = internal::real(residual.dot(p)); // the square of the absolute value of r scaled by invM
RealScalar absNew = numext::real(residual.dot(p)); // the square of the absolute value of r scaled by invM
int i = 0;
while(i < maxIters)
{
@@ -80,7 +80,7 @@ void conjugate_gradient(const MatrixType& mat, const Rhs& rhs, Dest& x,
z = precond.solve(residual); // approximately solve for "A z = residual"
RealScalar absOld = absNew;
absNew = internal::real(residual.dot(z)); // update the absolute value of r
absNew = numext::real(residual.dot(z)); // update the absolute value of r
RealScalar beta = absNew / absOld; // calculate the Gram-Schmidt value used to create the new search direction
p = z + beta * p; // update search direction
i++;

View File

@@ -310,7 +310,7 @@ void IncompleteLUT<Scalar>::factorize(const _MatrixType& amat)
jr(k) = jpos;
++sizeu;
}
rownorm += internal::abs2(j_it.value());
rownorm += numext::abs2(j_it.value());
}
// 2 - detect possible zero row