aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Geometry
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2009-08-06 14:10:02 +0200
committerGravatar Gael Guennebaud <g.gael@free.fr>2009-08-06 14:10:02 +0200
commit1d4fea48b57ef2fdd20df909c65e3432e26e91f9 (patch)
tree4e4c1992d149860c1ea4cd81644e430e7d85856f /Eigen/src/Geometry
parentc2861dd41a1b0f86757af98011d20e156b05979b (diff)
fix a couple of compilations issues
Diffstat (limited to 'Eigen/src/Geometry')
-rw-r--r--Eigen/src/Geometry/Transform.h6
-rw-r--r--Eigen/src/Geometry/Umeyama.h6
2 files changed, 5 insertions, 7 deletions
diff --git a/Eigen/src/Geometry/Transform.h b/Eigen/src/Geometry/Transform.h
index 2762ea2b5..bc06598c1 100644
--- a/Eigen/src/Geometry/Transform.h
+++ b/Eigen/src/Geometry/Transform.h
@@ -911,11 +911,7 @@ Transform<Scalar,Dim,Mode>::inverse(TransformTraits hint) const
}
// translation and remaining parts
res.template corner<Dim,1>(TopRight) = - res.template corner<Dim,Dim>(TopLeft) * translation();
- if (int(Mode)!=AffineCompact)
- {
- res.template corner<1,Dim>(BottomLeft).setZero();
- res.coeffRef(Dim,Dim) = Scalar(1);
- }
+ makeAffine();
return res;
}
}
diff --git a/Eigen/src/Geometry/Umeyama.h b/Eigen/src/Geometry/Umeyama.h
index 67747d94f..64c06fe66 100644
--- a/Eigen/src/Geometry/Umeyama.h
+++ b/Eigen/src/Geometry/Umeyama.h
@@ -174,8 +174,10 @@ umeyama(const MatrixBase<Derived>& src, const MatrixBase<OtherDerived>& dst, boo
const Scalar c = 1/src_var * svd.singularValues().dot(S);
// Eq. (41)
- // TODO: lazyness does not make much sense over here, right?
- Rt.col(m).segment(0,m) = dst_mean - c*Rt.block(0,0,m,m)*src_mean;
+ // Note that we first assign dst_mean to the destination so that there no need
+ // for a temporary.
+ Rt.col(m).start(m) = dst_mean;
+ Rt.col(m).start(m) -= (c*Rt.corner(TopLeft,m,m)*src_mean).lazy();
if (with_scaling) Rt.block(0,0,m,m) *= c;