diff --git a/gtsam/base/Group.h b/gtsam/base/Group.h index a5ae6ba1c..f520b2ff7 100644 --- a/gtsam/base/Group.h +++ b/gtsam/base/Group.h @@ -133,9 +133,6 @@ class DirectProduct: public std::pair { BOOST_CONCEPT_ASSERT((IsGroup)); BOOST_CONCEPT_ASSERT((IsGroup)); - const G& g() const {return this->first;} - const H& h() const {return this->second;} - public: /// Default constructor yields identity DirectProduct():std::pair(traits::Identity(),traits::Identity()) {} @@ -144,10 +141,11 @@ public: DirectProduct(const G& g, const H& h):std::pair(g,h) {} Derived operator*(const Derived& other) const { - return Derived(traits::Compose(g(),other.g()), traits::Compose(h(),other.h())); + return Derived(traits::Compose(this->first, other.first), + traits::Compose(this->second, other.second)); } Derived inverse() const { - return Derived(g().inverse(), h().inverse()); + return Derived(this->first.inverse(), this->second.inverse()); } };