mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
fix bug #294: add a diagonal() method to SparseMatrix (const)
This commit is contained in:
@@ -398,7 +398,7 @@ public:
|
||||
/** \returns the determinant of the underlying matrix from the current factorization */
|
||||
Scalar determinant() const
|
||||
{
|
||||
Scalar detL = Diagonal<const CholMatrixType>(Base::m_matrix).prod();
|
||||
Scalar detL = Base::m_matrix.diagonal().prod();
|
||||
return internal::abs2(detL);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user