aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2013-08-20 12:10:38 +0200
committerGravatar Gael Guennebaud <g.gael@free.fr>2013-08-20 12:10:38 +0200
commit2cf513e9734bcc3f7b38ae1939e5369d47d7a171 (patch)
tree650f6ac30a0c387dbfe14d092f6f9fc2e0feffe2
parent150c9fe5363d96c248b1ad3b19316c2d3ad5824d (diff)
parente4ffb7729ad41d58cb1a4b284601440b8f52bfb7 (diff)
Merged in advanpix/eigen-mp-devs (pull request PR-31)
Added support for custom scalars in SparseLU
-rw-r--r--Eigen/src/SparseLU/SparseLU.h6
-rw-r--r--Eigen/src/SparseLU/SparseLU_pivotL.h6
2 files changed, 8 insertions, 4 deletions
diff --git a/Eigen/src/SparseLU/SparseLU.h b/Eigen/src/SparseLU/SparseLU.h
index 3abe998f2..f2b907326 100644
--- a/Eigen/src/SparseLU/SparseLU.h
+++ b/Eigen/src/SparseLU/SparseLU.h
@@ -267,7 +267,8 @@ class SparseLU : public internal::SparseLUImpl<typename _MatrixType::Scalar, typ
if(it.row() < j) continue;
if(it.row() == j)
{
- det *= (std::abs)(it.value());
+ using std::abs;
+ det *= abs(it.value());
break;
}
}
@@ -294,7 +295,8 @@ class SparseLU : public internal::SparseLUImpl<typename _MatrixType::Scalar, typ
if(it.row() < j) continue;
if(it.row() == j)
{
- det += (std::log)((std::abs)(it.value()));
+ using std::log, std::abs;
+ det += log(abs(it.value()));
break;
}
}
diff --git a/Eigen/src/SparseLU/SparseLU_pivotL.h b/Eigen/src/SparseLU/SparseLU_pivotL.h
index ddcd4ec98..457789c78 100644
--- a/Eigen/src/SparseLU/SparseLU_pivotL.h
+++ b/Eigen/src/SparseLU/SparseLU_pivotL.h
@@ -77,7 +77,8 @@ Index SparseLUImpl<Scalar,Index>::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<Scalar,Index>::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];