diff --git a/gtsam/geometry/SOn.h b/gtsam/geometry/SOn.h index a827b3a63..06031b093 100644 --- a/gtsam/geometry/SOn.h +++ b/gtsam/geometry/SOn.h @@ -53,6 +53,9 @@ class SO : public LieGroup, internal::DimensionSO(N)> { using VectorN2 = Eigen::Matrix; using MatrixDD = Eigen::Matrix; + public: + EIGEN_MAKE_ALIGNED_OPERATOR_NEW + protected: MatrixNN matrix_; ///< Rotation matrix diff --git a/gtsam/linear/GaussianBayesNet.cpp b/gtsam/linear/GaussianBayesNet.cpp index bc96452b9..4118d8f71 100644 --- a/gtsam/linear/GaussianBayesNet.cpp +++ b/gtsam/linear/GaussianBayesNet.cpp @@ -194,9 +194,9 @@ namespace gtsam { if(cg->get_model()) { Vector diag = cg->R().diagonal(); cg->get_model()->whitenInPlace(diag); - logDet += diag.unaryExpr(ptr_fun(log)).sum(); + logDet += diag.unaryExpr([](double c){return log(c);}).sum(); } else { - logDet += cg->R().diagonal().unaryExpr(ptr_fun(log)).sum(); + logDet += cg->R().diagonal().unaryExpr([](double c){return log(c);}).sum(); } } return logDet;