mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-14 20:56:00 +08:00
don't try to finish early
This commit is contained in:
parent
924b55e9a9
commit
41e942d3fb
@ -361,8 +361,8 @@ LU<MatrixType>& LU<MatrixType>::compute(const MatrixType& matrix)
|
|||||||
col_of_biggest_in_corner += k;
|
col_of_biggest_in_corner += k;
|
||||||
if(k==0) biggest = biggest_in_corner;
|
if(k==0) biggest = biggest_in_corner;
|
||||||
|
|
||||||
// if the corner is negligible, then we have less than full rank, and we can finish early
|
// if the corner is exactly zero, terminate to avoid generating NaN values
|
||||||
if(ei_isMuchSmallerThan(biggest_in_corner, biggest, m_precision))
|
if(biggest_in_corner == RealScalar(0))
|
||||||
{
|
{
|
||||||
m_rank = k;
|
m_rank = k;
|
||||||
for(int i = k; i < size; i++)
|
for(int i = k; i < size; i++)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user