mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Fix bug #314:
- remove most of the metaprogramming kung fu in MathFunctions.h (only keep functions that differs from the std) - remove the overloads for array expression that were in the std namespace
This commit is contained in:
@@ -53,6 +53,8 @@ template<typename MatrixType, int Cols2> void qr_fixedsize()
|
||||
|
||||
template<typename MatrixType> void qr_invertible()
|
||||
{
|
||||
using std::log;
|
||||
using std::abs;
|
||||
typedef typename NumTraits<typename MatrixType::Scalar>::Real RealScalar;
|
||||
typedef typename MatrixType::Scalar Scalar;
|
||||
|
||||
@@ -76,12 +78,12 @@ template<typename MatrixType> void qr_invertible()
|
||||
// now construct a matrix with prescribed determinant
|
||||
m1.setZero();
|
||||
for(int i = 0; i < size; i++) m1(i,i) = internal::random<Scalar>();
|
||||
RealScalar absdet = internal::abs(m1.diagonal().prod());
|
||||
RealScalar absdet = abs(m1.diagonal().prod());
|
||||
m3 = qr.householderQ(); // get a unitary
|
||||
m1 = m3 * m1 * m3;
|
||||
qr.compute(m1);
|
||||
VERIFY_IS_APPROX(absdet, qr.absDeterminant());
|
||||
VERIFY_IS_APPROX(internal::log(absdet), qr.logAbsDeterminant());
|
||||
VERIFY_IS_APPROX(log(absdet), qr.logAbsDeterminant());
|
||||
}
|
||||
|
||||
template<typename MatrixType> void qr_verify_assert()
|
||||
|
||||
Reference in New Issue
Block a user