From ecfbe384be585acc42d80c2bec54597681de15cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Apitzsch?= Date: Fri, 16 Aug 2024 14:45:08 +0200 Subject: [PATCH] Replace CoinAbs by std::abs --- src/CoinDenseVector.hpp | 4 ++-- src/CoinPackedMatrix.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/CoinDenseVector.hpp b/src/CoinDenseVector.hpp index abd4cd84..6de6fada 100644 --- a/src/CoinDenseVector.hpp +++ b/src/CoinDenseVector.hpp @@ -127,7 +127,7 @@ class CoinDenseVector { { T norm = 0; for (int i = 0; i < nElements_; i++) - norm += CoinAbs(elements_[i]); + norm += std::abs(elements_[i]); return norm; } /// 2-norm of vector @@ -145,7 +145,7 @@ class CoinDenseVector { { T norm = 0; for (int i = 0; i < nElements_; i++) - norm = std::max(norm, CoinAbs(elements_[i])); + norm = std::max(norm, std::abs(elements_[i])); return norm; } /// sum of vector elements diff --git a/src/CoinPackedMatrix.cpp b/src/CoinPackedMatrix.cpp index 959721be..a7329c5f 100644 --- a/src/CoinPackedMatrix.cpp +++ b/src/CoinPackedMatrix.cpp @@ -3649,7 +3649,7 @@ int CoinPackedMatrix::verifyMtx(int verbosity, bool zeroesAreError) const errs++; } double aij = coeffs[ii]; - if (CoinIsnan(aij) || CoinAbs(aij) > largeCoeff) { + if (CoinIsnan(aij) || std::abs(aij) > largeCoeff) { if (verbosity >= 1) { std::cout << " (" << ii << ") a<" << majndx << "," << minndx << "> = " @@ -3657,7 +3657,7 @@ int CoinPackedMatrix::verifyMtx(int verbosity, bool zeroesAreError) const } errs++; } - if (CoinAbs(aij) < smallCoeff) { + if (std::abs(aij) < smallCoeff) { if (verbosity >= 4 || zeroesAreError) { std::cout << " (" << ii << ") a<" << majndx << "," << minndx << "> = "