Work around compiler bug in Umeyama.h.

This commit is contained in:
Rasmus Munk Larsen 2023-05-09 18:53:56 +00:00
parent fbf7189bd5
commit 524c329ab2

View File

@ -136,7 +136,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();