mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-07-20 11:54:27 +08:00
fix LLT for zero matrix
This commit is contained in:
parent
ccc6731f86
commit
ec39a39cb6
@ -132,7 +132,8 @@ void LLT<MatrixType>::compute(const MatrixType& a)
|
|||||||
m_isInitialized = true;
|
m_isInitialized = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
m_matrix.col(0).end(size-1) = a.row(0).end(size-1).adjoint() / ei_real(m_matrix.coeff(0,0));
|
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)
|
for (int j = 1; j < size; ++j)
|
||||||
{
|
{
|
||||||
x = ei_real(a.coeff(j,j)) - m_matrix.row(j).start(j).squaredNorm();
|
x = ei_real(a.coeff(j,j)) - m_matrix.row(j).start(j).squaredNorm();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user