mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Fix SVD for MSVC.
This commit is contained in:
committed by
Rasmus Munk Larsen
parent
19c39bea29
commit
f03df0df53
@@ -113,9 +113,8 @@ void svd_least_square(const MatrixType& m) {
|
||||
RhsType rhs = RhsType::Random(rows, internal::random<Index>(1, cols));
|
||||
SvdType svd(m);
|
||||
|
||||
if (internal::is_same<RealScalar, double>::value)
|
||||
svd.setThreshold(1e-8);
|
||||
else if(internal::is_same<RealScalar,float>::value) svd.setThreshold(2e-4);
|
||||
if (internal::is_same<RealScalar, double>::value) svd.setThreshold(RealScalar(1e-8));
|
||||
else if(internal::is_same<RealScalar,float>::value) svd.setThreshold(RealScalar(2e-4));
|
||||
|
||||
SolutionType x = svd.solve(rhs);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user