Fix alignment on SO<n>

release/4.3a0
Fan Jiang 2019-11-18 11:27:08 -05:00
parent 41902efc79
commit 78af8894f2
2 changed files with 5 additions and 2 deletions

View File

@ -53,6 +53,9 @@ class SO : public LieGroup<SO<N>, internal::DimensionSO(N)> {
using VectorN2 = Eigen::Matrix<double, internal::NSquaredSO(N), 1>; using VectorN2 = Eigen::Matrix<double, internal::NSquaredSO(N), 1>;
using MatrixDD = Eigen::Matrix<double, dimension, dimension>; using MatrixDD = Eigen::Matrix<double, dimension, dimension>;
public:
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
protected: protected:
MatrixNN matrix_; ///< Rotation matrix MatrixNN matrix_; ///< Rotation matrix

View File

@ -194,9 +194,9 @@ namespace gtsam {
if(cg->get_model()) { if(cg->get_model()) {
Vector diag = cg->R().diagonal(); Vector diag = cg->R().diagonal();
cg->get_model()->whitenInPlace(diag); cg->get_model()->whitenInPlace(diag);
logDet += diag.unaryExpr(ptr_fun<double,double>(log)).sum(); logDet += diag.unaryExpr([](double c){return log(c);}).sum();
} else { } else {
logDet += cg->R().diagonal().unaryExpr(ptr_fun<double,double>(log)).sum(); logDet += cg->R().diagonal().unaryExpr([](double c){return log(c);}).sum();
} }
} }
return logDet; return logDet;