gtsam  3.2.1
gtsam
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Group.h
Go to the documentation of this file.
1 /* ----------------------------------------------------------------------------
2 
3  * GTSAM Copyright 2010, Georgia Tech Research Corporation,
4  * Atlanta, Georgia 30332-0415
5  * All Rights Reserved
6  * Authors: Frank Dellaert, et al. (see THANKS for the full author list)
7 
8  * See LICENSE for the license information
9 
10  * -------------------------------------------------------------------------- */
11 
20 #pragma once
21 
22 #include <gtsam/global_includes.h>
23 
24 namespace gtsam {
25 
30 template<class T>
31 class GroupConcept {
32 private:
33  static T concept_check(const T& t) {
35  T t2 = t;
36 
38  T identity = T::identity();
39 
41  T compose_ret = identity.compose(t2);
42 
44  T inverse_ret = compose_ret.inverse();
45 
46  return inverse_ret;
47  }
48 };
49 
50 } // \namespace gtsam
51 
60 #define GTSAM_CONCEPT_GROUP_INST(T) template class gtsam::GroupConcept<T>;
61 #define GTSAM_CONCEPT_GROUP_TYPE(T) typedef gtsam::GroupConcept<T> _gtsam_GroupConcept_##T;
Included from all GTSAM files.
This concept check enforces a Group structure on a variable type, in which we require the existence o...
Definition: Group.h:31