mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-06-04 18:54:00 +08:00
fix a bug in determinant of 4x4 matrices and a small type issue in Inverse
This commit is contained in:
parent
173e582e3c
commit
62bf0bbd59
@ -52,7 +52,7 @@ struct ei_visitor_unroller<Visitor, Derived, 1>
|
||||
template<typename Visitor, typename Derived>
|
||||
struct ei_visitor_unroller<Visitor, Derived, Dynamic>
|
||||
{
|
||||
static void run(const Derived &mat, Visitor& visitor) {}
|
||||
static void run(const Derived &, Visitor&) {}
|
||||
};
|
||||
|
||||
|
||||
|
@ -57,10 +57,10 @@ const typename Derived::Scalar ei_bruteforce_det(const MatrixBase<Derived>& m)
|
||||
case 4:
|
||||
// trick by Martin Costabel to compute 4x4 det with only 30 muls
|
||||
return ei_bruteforce_det4_helper(m,0,1,2,3)
|
||||
+ ei_bruteforce_det4_helper(m,0,2,1,3)
|
||||
- ei_bruteforce_det4_helper(m,0,2,1,3)
|
||||
+ ei_bruteforce_det4_helper(m,0,3,1,2)
|
||||
+ ei_bruteforce_det4_helper(m,1,2,0,3)
|
||||
+ ei_bruteforce_det4_helper(m,1,3,0,2)
|
||||
- ei_bruteforce_det4_helper(m,1,3,0,2)
|
||||
+ ei_bruteforce_det4_helper(m,2,3,0,1);
|
||||
default:
|
||||
assert(false);
|
||||
|
@ -98,7 +98,7 @@ template<typename MatrixType, bool CheckExistence> class Inverse : ei_no_assignm
|
||||
|
||||
protected:
|
||||
bool m_exists;
|
||||
MatrixType m_inverse;
|
||||
typename MatrixType::Eval m_inverse;
|
||||
};
|
||||
|
||||
template<typename MatrixType, bool CheckExistence>
|
||||
|
Loading…
x
Reference in New Issue
Block a user