fix a bug in determinant of 4x4 matrices and a small type issue in Inverse

This commit is contained in:
Gael Guennebaud 2008-04-26 08:56:52 +00:00
parent 173e582e3c
commit 62bf0bbd59
3 changed files with 7 additions and 7 deletions

View File

@ -52,7 +52,7 @@ struct ei_visitor_unroller<Visitor, Derived, 1>
template<typename Visitor, typename Derived> template<typename Visitor, typename Derived>
struct ei_visitor_unroller<Visitor, Derived, Dynamic> struct ei_visitor_unroller<Visitor, Derived, Dynamic>
{ {
static void run(const Derived &mat, Visitor& visitor) {} static void run(const Derived &, Visitor&) {}
}; };

View File

@ -57,10 +57,10 @@ const typename Derived::Scalar ei_bruteforce_det(const MatrixBase<Derived>& m)
case 4: case 4:
// trick by Martin Costabel to compute 4x4 det with only 30 muls // trick by Martin Costabel to compute 4x4 det with only 30 muls
return ei_bruteforce_det4_helper(m,0,1,2,3) 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,0,3,1,2)
+ ei_bruteforce_det4_helper(m,1,2,0,3) + 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); + ei_bruteforce_det4_helper(m,2,3,0,1);
default: default:
assert(false); assert(false);

View File

@ -98,7 +98,7 @@ template<typename MatrixType, bool CheckExistence> class Inverse : ei_no_assignm
protected: protected:
bool m_exists; bool m_exists;
MatrixType m_inverse; typename MatrixType::Eval m_inverse;
}; };
template<typename MatrixType, bool CheckExistence> template<typename MatrixType, bool CheckExistence>