fix LLT for zero matrix

This commit is contained in:
Gael Guennebaud 2010-07-15 20:00:34 +02:00
parent ccc6731f86
commit ec39a39cb6

View File

@ -132,6 +132,7 @@ void LLT<MatrixType>::compute(const MatrixType& a)
m_isInitialized = true;
return;
}
if(ei_real(m_matrix.coeff(0,0))>0)
m_matrix.col(0).end(size-1) = a.row(0).end(size-1).adjoint() / ei_real(m_matrix.coeff(0,0));
for (int j = 1; j < size; ++j)
{