From d908ccc01cbb3483d3271589a16edde4358420fd Mon Sep 17 00:00:00 2001 From: Pavel Holoborodko Date: Tue, 20 Aug 2013 15:00:28 +0900 Subject: [PATCH 1/2] Added support for custom scalars --- Eigen/src/SparseLU/SparseLU.h | 6 ++++-- Eigen/src/SparseLU/SparseLU_pivotL.h | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Eigen/src/SparseLU/SparseLU.h b/Eigen/src/SparseLU/SparseLU.h index 3abe998f2..aae82a1bc 100644 --- a/Eigen/src/SparseLU/SparseLU.h +++ b/Eigen/src/SparseLU/SparseLU.h @@ -267,7 +267,8 @@ class SparseLU : public internal::SparseLUImpl::pivotL(const Index jcol, const RealScalar& dia RealScalar rtemp; Index isub, icol, itemp, k; for (isub = nsupc; isub < nsupr; ++isub) { - rtemp = std::abs(lu_col_ptr[isub]); + using std::abs; + rtemp = abs(lu_col_ptr[isub]); if (rtemp > pivmax) { pivmax = rtemp; pivptr = isub; @@ -101,7 +102,8 @@ Index SparseLUImpl::pivotL(const Index jcol, const RealScalar& dia if (diag >= 0 ) { // Diagonal element exists - rtemp = std::abs(lu_col_ptr[diag]); + using std::abs; + rtemp = abs(lu_col_ptr[diag]); if (rtemp != 0.0 && rtemp >= thresh) pivptr = diag; } pivrow = lsub_ptr[pivptr]; From e4ffb7729ad41d58cb1a4b284601440b8f52bfb7 Mon Sep 17 00:00:00 2001 From: Pavel Holoborodko Date: Tue, 20 Aug 2013 16:06:13 +0900 Subject: [PATCH 2/2] Removed unnecessary parentheses --- Eigen/src/SparseLU/SparseLU.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Eigen/src/SparseLU/SparseLU.h b/Eigen/src/SparseLU/SparseLU.h index aae82a1bc..f2b907326 100644 --- a/Eigen/src/SparseLU/SparseLU.h +++ b/Eigen/src/SparseLU/SparseLU.h @@ -268,7 +268,7 @@ class SparseLU : public internal::SparseLUImpl