Added support for custom scalars

This commit is contained in:
Pavel Holoborodko
2013-08-20 15:00:28 +09:00
parent 2b15e00106
commit d908ccc01c
2 changed files with 8 additions and 4 deletions

View File

@@ -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;
}
}