diff options
author | Benoit Jacob <jacob.benoit.1@gmail.com> | 2010-05-30 16:00:58 -0400 |
---|---|---|
committer | Benoit Jacob <jacob.benoit.1@gmail.com> | 2010-05-30 16:00:58 -0400 |
commit | aaaade4b3d66d67d2c08af3372c3965e7255b2e8 (patch) | |
tree | 76dfaefb014333b2f98c6db660454771655ea8b7 /Eigen/src/Geometry/Umeyama.h | |
parent | faa3ff3be6a02b57c6cb05edc87375e54ab96606 (diff) |
the Index types change.
As discussed on the list (too long to explain here).
Diffstat (limited to 'Eigen/src/Geometry/Umeyama.h')
-rw-r--r-- | Eigen/src/Geometry/Umeyama.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Eigen/src/Geometry/Umeyama.h b/Eigen/src/Geometry/Umeyama.h index 262d27aa3..5b9fd7725 100644 --- a/Eigen/src/Geometry/Umeyama.h +++ b/Eigen/src/Geometry/Umeyama.h @@ -109,6 +109,7 @@ umeyama(const MatrixBase<Derived>& src, const MatrixBase<OtherDerived>& dst, boo typedef typename ei_umeyama_transform_matrix_type<Derived, OtherDerived>::type TransformationMatrixType; typedef typename ei_traits<TransformationMatrixType>::Scalar Scalar; typedef typename NumTraits<Scalar>::Real RealScalar; + typedef typename Derived::Index Index; EIGEN_STATIC_ASSERT(!NumTraits<Scalar>::IsComplex, NUMERIC_TYPE_MUST_BE_REAL) EIGEN_STATIC_ASSERT((ei_is_same_type<Scalar, typename ei_traits<OtherDerived>::Scalar>::ret), @@ -120,8 +121,8 @@ umeyama(const MatrixBase<Derived>& src, const MatrixBase<OtherDerived>& dst, boo typedef Matrix<Scalar, Dimension, Dimension> MatrixType; typedef typename ei_plain_matrix_type_row_major<Derived>::type RowMajorMatrixType; - const int m = src.rows(); // dimension - const int n = src.cols(); // number of measurements + const Index m = src.rows(); // dimension + const Index n = src.cols(); // number of measurements // required for demeaning ... const RealScalar one_over_n = 1 / static_cast<RealScalar>(n); @@ -151,7 +152,7 @@ umeyama(const MatrixBase<Derived>& src, const MatrixBase<OtherDerived>& dst, boo // Eq. (40) and (43) const VectorType& d = svd.singularValues(); - int rank = 0; for (int i=0; i<m; ++i) if (!ei_isMuchSmallerThan(d.coeff(i),d.coeff(0))) ++rank; + Index rank = 0; for (Index i=0; i<m; ++i) if (!ei_isMuchSmallerThan(d.coeff(i),d.coeff(0))) ++rank; if (rank == m-1) { if ( svd.matrixU().determinant() * svd.matrixV().determinant() > 0 ) { Rt.block(0,0,m,m).noalias() = svd.matrixU()*svd.matrixV().transpose(); |