diff options
author | Gael Guennebaud <g.gael@free.fr> | 2013-08-20 14:12:42 +0200 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2013-08-20 14:12:42 +0200 |
commit | c06e373bebd872be84d0524f10c208cce072090a (patch) | |
tree | 5ac19d3c9cc0e49e6bf4fa407c4890e57d772552 /Eigen/src/SparseLU | |
parent | 7bca2910c7922021ea447739eb0596f15790c891 (diff) |
Fix compilation with non-msvc compilers.
Diffstat (limited to 'Eigen/src/SparseLU')
-rw-r--r-- | Eigen/src/SparseLU/SparseLU.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Eigen/src/SparseLU/SparseLU.h b/Eigen/src/SparseLU/SparseLU.h index f2b907326..44239e57a 100644 --- a/Eigen/src/SparseLU/SparseLU.h +++ b/Eigen/src/SparseLU/SparseLU.h @@ -255,6 +255,7 @@ class SparseLU : public internal::SparseLUImpl<typename _MatrixType::Scalar, typ */ Scalar absDeterminant() { + using std::abs; eigen_assert(m_factorizationIsOk && "The matrix should be factorized first."); // Initialize with the determinant of the row matrix Scalar det = Scalar(1.); @@ -267,7 +268,6 @@ class SparseLU : public internal::SparseLUImpl<typename _MatrixType::Scalar, typ if(it.row() < j) continue; if(it.row() == j) { - using std::abs; det *= abs(it.value()); break; } @@ -286,6 +286,9 @@ class SparseLU : public internal::SparseLUImpl<typename _MatrixType::Scalar, typ */ Scalar logAbsDeterminant() const { + using std::log; + using std::abs; + eigen_assert(m_factorizationIsOk && "The matrix should be factorized first."); Scalar det = Scalar(0.); for (Index j = 0; j < this->cols(); ++j) @@ -295,7 +298,6 @@ class SparseLU : public internal::SparseLUImpl<typename _MatrixType::Scalar, typ if(it.row() < j) continue; if(it.row() == j) { - using std::log, std::abs; det += log(abs(it.value())); break; } |