mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-06-04 18:54:00 +08:00
bug #1509: fix computeInverseWithCheck for complexes
This commit is contained in:
parent
b903fa74fd
commit
2f833b1c64
@ -404,7 +404,7 @@ inline void MatrixBase<Derived>::computeInverseWithCheck(
|
|||||||
const RealScalar& absDeterminantThreshold
|
const RealScalar& absDeterminantThreshold
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
RealScalar determinant;
|
Scalar determinant;
|
||||||
// i'd love to put some static assertions there, but SFINAE means that they have no effect...
|
// i'd love to put some static assertions there, but SFINAE means that they have no effect...
|
||||||
eigen_assert(rows() == cols());
|
eigen_assert(rows() == cols());
|
||||||
computeInverseAndDetWithCheck(inverse,determinant,invertible,absDeterminantThreshold);
|
computeInverseAndDetWithCheck(inverse,determinant,invertible,absDeterminantThreshold);
|
||||||
|
@ -47,7 +47,7 @@ template<typename MatrixType> void inverse(const MatrixType& m)
|
|||||||
//computeInverseAndDetWithCheck tests
|
//computeInverseAndDetWithCheck tests
|
||||||
//First: an invertible matrix
|
//First: an invertible matrix
|
||||||
bool invertible;
|
bool invertible;
|
||||||
RealScalar det;
|
Scalar det;
|
||||||
|
|
||||||
m2.setZero();
|
m2.setZero();
|
||||||
m1.computeInverseAndDetWithCheck(m2, det, invertible);
|
m1.computeInverseAndDetWithCheck(m2, det, invertible);
|
||||||
@ -113,5 +113,7 @@ void test_inverse()
|
|||||||
|
|
||||||
CALL_SUBTEST_7( inverse(Matrix4d()) );
|
CALL_SUBTEST_7( inverse(Matrix4d()) );
|
||||||
CALL_SUBTEST_7( inverse(Matrix<double,4,4,DontAlign>()) );
|
CALL_SUBTEST_7( inverse(Matrix<double,4,4,DontAlign>()) );
|
||||||
|
|
||||||
|
CALL_SUBTEST_8( inverse(Matrix4cd()) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user