gtsam  4.0.0
gtsam
concepts.h
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 
25 #pragma once
26 
27 #include <gtsam/base/Matrix.h>
28 #include <boost/optional.hpp>
29 
30 namespace gtsam {
31 
38 template<class POSE>
39 class PoseConcept {
40 public:
41  typedef typename POSE::Translation Translation;
42  typedef typename POSE::Rotation Rotation;
43 
44 private:
45  static Rotation checkRotationMemberAccess(const POSE& p) {
46  return p.rotation();
47  }
48 
49  static Translation checkTranslationMemberAccess(const POSE& p) {
50  return p.translation();
51  }
52 
53  static std::pair<size_t, size_t> checkTranslationInterval() {
54  return POSE::translationInterval();
55  }
56 
57  static std::pair<size_t, size_t> checkRotationInterval() {
58  return POSE::rotationInterval();
59  }
60 };
61 
62 } // \namespace gtsam
63 
74 #define GTSAM_CONCEPT_POSE_INST(T) template class gtsam::PoseConcept<T>;
75 #define GTSAM_CONCEPT_POSE_TYPE(T) typedef gtsam::PoseConcept<T> _gtsam_PoseConcept##T;
76 
Pose Concept A must contain a translation and a rotation, with each structure accessable directly and...
Definition: concepts.h:39
Global functions in a separate testing namespace.
Definition: chartTesting.h:28
typedef and functions to augment Eigen's MatrixXd