From 3d3d574325d015160061cb9c284c13c6e0ebf620 Mon Sep 17 00:00:00 2001 From: dellaert Date: Sun, 21 Dec 2014 13:30:21 +0100 Subject: [PATCH] Small refactor --- gtsam/geometry/Cyclic.h | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/gtsam/geometry/Cyclic.h b/gtsam/geometry/Cyclic.h index 886928ad8..3c8790bea 100644 --- a/gtsam/geometry/Cyclic.h +++ b/gtsam/geometry/Cyclic.h @@ -30,7 +30,7 @@ public: i_(i) { assert(i - /// Define cyclic group traits to be a model of the Group concept -template -struct traits_x { +template +struct traits_x > { typedef group_tag structure_category; - GTSAM_ADDITIVE_GROUP(CYCLIC_TYPE); - static CYCLIC_TYPE Identity() { return CYCLIC_TYPE::Identity(); } - static bool Equals(const CYCLIC_TYPE& a, const CYCLIC_TYPE& b, double tol=1e-9) { return a.equals(b,tol); } - static void Print(const CYCLIC_TYPE& c, const std::string &s="") { c.print(s); } + GTSAM_ADDITIVE_GROUP(Cyclic) + static Cyclic Identity() { return Cyclic::Identity();} + static bool Equals(const Cyclic& a, const Cyclic& b, double tol = 1e-9) { + return a.equals(b, tol); + } + static void Print(const Cyclic& c, const std::string &s = "") {c.print(s);} }; } // \namespace gtsam