mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-03-07 18:27:40 +08:00
Relax tolerance when testing LDLT on singular problems
This commit is contained in:
parent
2212e40e95
commit
3946c981b1
@ -225,7 +225,20 @@ template<typename MatrixType> void cholesky(const MatrixType& m)
|
||||
ldltlo.compute(A);
|
||||
VERIFY_IS_APPROX(A, ldltlo.reconstructedMatrix());
|
||||
vecX = ldltlo.solve(vecB);
|
||||
VERIFY_IS_APPROX(A * vecX, vecB);
|
||||
|
||||
if(ldltlo.vectorD().real().cwiseAbs().minCoeff()>RealScalar(0))
|
||||
{
|
||||
VERIFY_IS_APPROX(A * vecX,vecB);
|
||||
}
|
||||
else
|
||||
{
|
||||
RealScalar large_tol = std::sqrt(test_precision<RealScalar>());
|
||||
VERIFY((A * vecX).isApprox(vecB, large_tol));
|
||||
|
||||
++g_test_level;
|
||||
VERIFY_IS_APPROX(A * vecX,vecB);
|
||||
--g_test_level;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user