diff options
Diffstat (limited to 'Eigen/src/Geometry/Transform.h')
-rw-r--r-- | Eigen/src/Geometry/Transform.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Eigen/src/Geometry/Transform.h b/Eigen/src/Geometry/Transform.h index 7497b31ac..7d258c01d 100644 --- a/Eigen/src/Geometry/Transform.h +++ b/Eigen/src/Geometry/Transform.h @@ -1097,7 +1097,7 @@ template<typename Scalar, int Dim, int Mode, int Options> template<typename RotationMatrixType, typename ScalingMatrixType> EIGEN_DEVICE_FUNC void Transform<Scalar,Dim,Mode,Options>::computeRotationScaling(RotationMatrixType *rotation, ScalingMatrixType *scaling) const { - // TODO: investigate BDCSVD implementation. + // Note that JacobiSVD is faster than BDCSVD for small matrices. JacobiSVD<LinearMatrixType> svd(linear(), ComputeFullU | ComputeFullV); Scalar x = (svd.matrixU() * svd.matrixV().adjoint()).determinant() < Scalar(0) ? Scalar(-1) : Scalar(1); // so x has absolute value 1 @@ -1127,7 +1127,7 @@ template<typename Scalar, int Dim, int Mode, int Options> template<typename ScalingMatrixType, typename RotationMatrixType> EIGEN_DEVICE_FUNC void Transform<Scalar,Dim,Mode,Options>::computeScalingRotation(ScalingMatrixType *scaling, RotationMatrixType *rotation) const { - // TODO: investigate BDCSVD implementation. + // Note that JacobiSVD is faster than BDCSVD for small matrices. JacobiSVD<LinearMatrixType> svd(linear(), ComputeFullU | ComputeFullV); Scalar x = (svd.matrixU() * svd.matrixV().adjoint()).determinant() < Scalar(0) ? Scalar(-1) : Scalar(1); // so x has absolute value 1 |