more consistent notation of macros

release/4.3a0
Jose Luis Blanco Claraco 2021-11-04 07:11:28 +01:00
parent a61cbdc4d1
commit 89ce766269
No known key found for this signature in database
GPG Key ID: D443304FBD70A641
17 changed files with 23 additions and 24 deletions

View File

@ -370,4 +370,4 @@ public:
* the gtsam namespace to be more easily enforced as testable * the gtsam namespace to be more easily enforced as testable
*/ */
#define GTSAM_CONCEPT_LIE_INST(T) template class gtsam::IsLieGroup<T>; #define GTSAM_CONCEPT_LIE_INST(T) template class gtsam::IsLieGroup<T>;
#define GTSAM_CONCEPT_LIE_TYPE(T) typedef gtsam::IsLieGroup<T> _gtsam_IsLieGroup_##T; #define GTSAM_CONCEPT_LIE_TYPE(T) using _gtsam_IsLieGroup_##T = gtsam::IsLieGroup<T>;

View File

@ -178,4 +178,4 @@ struct FixedDimension {
// * the gtsam namespace to be more easily enforced as testable // * the gtsam namespace to be more easily enforced as testable
// */ // */
#define GTSAM_CONCEPT_MANIFOLD_INST(T) template class gtsam::IsManifold<T>; #define GTSAM_CONCEPT_MANIFOLD_INST(T) template class gtsam::IsManifold<T>;
#define GTSAM_CONCEPT_MANIFOLD_TYPE(T) using _gtsam_IsManifold_##T = gtsam::IsManifold<T> #define GTSAM_CONCEPT_MANIFOLD_TYPE(T) using _gtsam_IsManifold_##T = gtsam::IsManifold<T>;

View File

@ -173,4 +173,4 @@ namespace gtsam {
* @deprecated please use BOOST_CONCEPT_ASSERT and * @deprecated please use BOOST_CONCEPT_ASSERT and
*/ */
#define GTSAM_CONCEPT_TESTABLE_INST(T) template class gtsam::IsTestable<T>; #define GTSAM_CONCEPT_TESTABLE_INST(T) template class gtsam::IsTestable<T>;
#define GTSAM_CONCEPT_TESTABLE_TYPE(T) using _gtsam_Testable_##T = gtsam::IsTestable<T> #define GTSAM_CONCEPT_TESTABLE_TYPE(T) using _gtsam_Testable_##T = gtsam::IsTestable<T>;

View File

@ -32,7 +32,7 @@ void testDefaultChart(TestResult& result_,
const std::string& name_, const std::string& name_,
const T& value) { const T& value) {
GTSAM_CONCEPT_TESTABLE_TYPE(T); GTSAM_CONCEPT_TESTABLE_TYPE(T)
typedef typename gtsam::DefaultChart<T> Chart; typedef typename gtsam::DefaultChart<T> Chart;
typedef typename Chart::vector Vector; typedef typename Chart::vector Vector;

View File

@ -35,7 +35,7 @@ class GTSAM_EXPORT PinholeBaseK: public PinholeBase {
private: private:
GTSAM_CONCEPT_MANIFOLD_TYPE(CALIBRATION); GTSAM_CONCEPT_MANIFOLD_TYPE(CALIBRATION)
// Get dimensions of calibration type at compile time // Get dimensions of calibration type at compile time
static const int DimK = FixedDimension<CALIBRATION>::value; static const int DimK = FixedDimension<CALIBRATION>::value;

View File

@ -110,7 +110,7 @@ class ClusterTree {
typedef sharedCluster sharedNode; typedef sharedCluster sharedNode;
/** concept check */ /** concept check */
GTSAM_CONCEPT_TESTABLE_TYPE(FactorType); GTSAM_CONCEPT_TESTABLE_TYPE(FactorType)
protected: protected:
FastVector<sharedNode> roots_; FastVector<sharedNode> roots_;

View File

@ -81,7 +81,7 @@ namespace gtsam {
protected: protected:
/** concept check */ /** concept check */
GTSAM_CONCEPT_TESTABLE_TYPE(FactorType); GTSAM_CONCEPT_TESTABLE_TYPE(FactorType)
FastVector<sharedNode> roots_; FastVector<sharedNode> roots_;
FastVector<sharedFactor> remainingFactors_; FastVector<sharedFactor> remainingFactors_;

View File

@ -121,7 +121,7 @@ class FactorGraph {
protected: protected:
/** concept check, makes sure FACTOR defines print and equals */ /** concept check, makes sure FACTOR defines print and equals */
GTSAM_CONCEPT_TESTABLE_TYPE(FACTOR); GTSAM_CONCEPT_TESTABLE_TYPE(FACTOR)
/** Collection of factors */ /** Collection of factors */
FastVector<sharedFactor> factors_; FastVector<sharedFactor> factors_;

View File

@ -45,7 +45,7 @@ class MagPoseFactor: public NoiseModelFactor1<POSE> {
using shared_ptr = boost::shared_ptr<MagPoseFactor<POSE>>; using shared_ptr = boost::shared_ptr<MagPoseFactor<POSE>>;
/// Concept check by type. /// Concept check by type.
GTSAM_CONCEPT_TESTABLE_TYPE(POSE); GTSAM_CONCEPT_TESTABLE_TYPE(POSE)
GTSAM_CONCEPT_POSE_TYPE(POSE); GTSAM_CONCEPT_POSE_TYPE(POSE);
public: public:

View File

@ -149,7 +149,7 @@ boost::tuple<V, int> nonlinearConjugateGradient(const S &system,
const V &initial, const NonlinearOptimizerParams &params, const V &initial, const NonlinearOptimizerParams &params,
const bool singleIteration, const bool gradientDescent = false) { const bool singleIteration, const bool gradientDescent = false) {
// GTSAM_CONCEPT_MANIFOLD_TYPE(V); // GTSAM_CONCEPT_MANIFOLD_TYPE(V)
size_t iteration = 0; size_t iteration = 0;

View File

@ -218,9 +218,8 @@ protected:
X value_; /// fixed value for variable X value_; /// fixed value for variable
GTSAM_CONCEPT_MANIFOLD_TYPE(X); GTSAM_CONCEPT_MANIFOLD_TYPE(X)
GTSAM_CONCEPT_TESTABLE_TYPE(X)
GTSAM_CONCEPT_TESTABLE_TYPE(X);
public: public:
@ -296,7 +295,7 @@ class NonlinearEquality2 : public NoiseModelFactor2<T, T> {
using Base = NoiseModelFactor2<T, T>; using Base = NoiseModelFactor2<T, T>;
using This = NonlinearEquality2<T>; using This = NonlinearEquality2<T>;
GTSAM_CONCEPT_MANIFOLD_TYPE(T); GTSAM_CONCEPT_MANIFOLD_TYPE(T)
/// Default constructor to allow for serialization /// Default constructor to allow for serialization
NonlinearEquality2() {} NonlinearEquality2() {}

View File

@ -39,7 +39,7 @@ namespace gtsam {
VALUE prior_; /** The measurement */ VALUE prior_; /** The measurement */
/** concept check by type */ /** concept check by type */
GTSAM_CONCEPT_TESTABLE_TYPE(T); GTSAM_CONCEPT_TESTABLE_TYPE(T)
public: public:

View File

@ -59,8 +59,8 @@ namespace gtsam {
template<class CAMERA, class LANDMARK> template<class CAMERA, class LANDMARK>
class GeneralSFMFactor: public NoiseModelFactor2<CAMERA, LANDMARK> { class GeneralSFMFactor: public NoiseModelFactor2<CAMERA, LANDMARK> {
GTSAM_CONCEPT_MANIFOLD_TYPE(CAMERA); GTSAM_CONCEPT_MANIFOLD_TYPE(CAMERA)
GTSAM_CONCEPT_MANIFOLD_TYPE(LANDMARK); GTSAM_CONCEPT_MANIFOLD_TYPE(LANDMARK)
static const int DimC = FixedDimension<CAMERA>::value; static const int DimC = FixedDimension<CAMERA>::value;
static const int DimL = FixedDimension<LANDMARK>::value; static const int DimL = FixedDimension<LANDMARK>::value;
@ -202,7 +202,7 @@ struct traits<GeneralSFMFactor<CAMERA, LANDMARK> > : Testable<
template<class CALIBRATION> template<class CALIBRATION>
class GeneralSFMFactor2: public NoiseModelFactor3<Pose3, Point3, CALIBRATION> { class GeneralSFMFactor2: public NoiseModelFactor3<Pose3, Point3, CALIBRATION> {
GTSAM_CONCEPT_MANIFOLD_TYPE(CALIBRATION); GTSAM_CONCEPT_MANIFOLD_TYPE(CALIBRATION)
static const int DimK = FixedDimension<CALIBRATION>::value; static const int DimK = FixedDimension<CALIBRATION>::value;
protected: protected:

View File

@ -56,8 +56,8 @@ private:
bool flag_bump_up_near_zero_probs_; bool flag_bump_up_near_zero_probs_;
/** concept check by type */ /** concept check by type */
GTSAM_CONCEPT_LIE_TYPE(T); GTSAM_CONCEPT_LIE_TYPE(T)
GTSAM_CONCEPT_TESTABLE_TYPE(T); GTSAM_CONCEPT_TESTABLE_TYPE(T)
public: public:

View File

@ -40,7 +40,7 @@ namespace gtsam {
boost::optional<POSE> body_P_sensor_; ///< The pose of the sensor in the body frame boost::optional<POSE> body_P_sensor_; ///< The pose of the sensor in the body frame
/** concept check by type */ /** concept check by type */
GTSAM_CONCEPT_TESTABLE_TYPE(POSE); GTSAM_CONCEPT_TESTABLE_TYPE(POSE)
GTSAM_CONCEPT_POSE_TYPE(POSE); GTSAM_CONCEPT_POSE_TYPE(POSE);
public: public:

View File

@ -37,7 +37,7 @@ namespace gtsam {
boost::optional<POSE> body_P_sensor_; ///< The pose of the sensor in the body frame boost::optional<POSE> body_P_sensor_; ///< The pose of the sensor in the body frame
/** concept check by type */ /** concept check by type */
GTSAM_CONCEPT_TESTABLE_TYPE(POSE); GTSAM_CONCEPT_TESTABLE_TYPE(POSE)
GTSAM_CONCEPT_POSE_TYPE(POSE); GTSAM_CONCEPT_POSE_TYPE(POSE);
public: public:

View File

@ -55,8 +55,8 @@ namespace gtsam {
SharedGaussian model_; SharedGaussian model_;
/** concept check by type */ /** concept check by type */
GTSAM_CONCEPT_LIE_TYPE(T); GTSAM_CONCEPT_LIE_TYPE(T)
GTSAM_CONCEPT_TESTABLE_TYPE(T); GTSAM_CONCEPT_TESTABLE_TYPE(T)
public: public: