Work around compiler bug in Umeyama.h.

(cherry picked from commit 524c329ab23fb565eff8aa2bf36d134e97773a99)
This commit is contained in:
Rasmus Munk Larsen 2023-05-09 18:53:56 +00:00 committed by Antonio Sanchez
parent 26b8fabd80
commit af3ca50f0b

View File

@ -137,7 +137,8 @@ umeyama(const MatrixBase<Derived>& src, const MatrixBase<OtherDerived>& dst, boo
VectorType S = VectorType::Ones(m); VectorType S = VectorType::Ones(m);
if ( svd.matrixU().determinant() * svd.matrixV().determinant() < 0 ) if ( svd.matrixU().determinant() * svd.matrixV().determinant() < 0 )
S(m-1) = -1; Index tmp = m - 1;
S(tmp) = -1;
// Eq. (40) and (43) // Eq. (40) and (43)
Rt.block(0,0,m,m).noalias() = svd.matrixU() * S.asDiagonal() * svd.matrixV().transpose(); Rt.block(0,0,m,m).noalias() = svd.matrixU() * S.asDiagonal() * svd.matrixV().transpose();