From b126a02795b358063b6016d2062c41e0d19906e9 Mon Sep 17 00:00:00 2001 From: Thomas Fischer <thomas.fischer@ufz.de> Date: Thu, 12 Jun 2014 08:10:36 +0200 Subject: [PATCH] [MathLib] Fix a critical bug in GaussAlgorithm. Reza discovered a bug within the gauss elimination. --- MathLib/LinAlg/Solvers/GaussAlgorithm-impl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MathLib/LinAlg/Solvers/GaussAlgorithm-impl.h b/MathLib/LinAlg/Solvers/GaussAlgorithm-impl.h index 22a31166ca7..25a6fa485ff 100644 --- a/MathLib/LinAlg/Solvers/GaussAlgorithm-impl.h +++ b/MathLib/LinAlg/Solvers/GaussAlgorithm-impl.h @@ -32,7 +32,7 @@ GaussAlgorithm<MAT_T, VEC_T>::GaussAlgorithm(MAT_T &A, _perm[k] = k; for (i=k+1; i<nr; i++) { if (std::abs(_mat(i,k)) > t) { - t = _mat(i,k); + t = std::abs(_mat(i,k)); _perm[k] = i; } } -- GitLab