removed std::type_traits which is c++11
parent
ef23309c84
commit
2788ec7f33
|
@ -178,7 +178,7 @@ private:
|
|||
namespace traits {
|
||||
|
||||
template<>
|
||||
struct is_manifold<LieMatrix> : public std::true_type {
|
||||
struct is_manifold<LieMatrix> : public boost::true_type {
|
||||
};
|
||||
|
||||
template<>
|
||||
|
|
|
@ -116,15 +116,15 @@ namespace gtsam {
|
|||
namespace traits {
|
||||
|
||||
template<>
|
||||
struct is_group<LieScalar> : public std::true_type {
|
||||
struct is_group<LieScalar> : public boost::true_type {
|
||||
};
|
||||
|
||||
template<>
|
||||
struct is_manifold<LieScalar> : public std::true_type {
|
||||
struct is_manifold<LieScalar> : public boost::true_type {
|
||||
};
|
||||
|
||||
template<>
|
||||
struct dimension<LieScalar> : public std::integral_constant<int, 1> {
|
||||
struct dimension<LieScalar> : public boost::integral_constant<int, 1> {
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -133,7 +133,7 @@ private:
|
|||
namespace traits {
|
||||
|
||||
template<>
|
||||
struct is_manifold<LieVector> : public std::true_type {
|
||||
struct is_manifold<LieVector> : public boost::true_type {
|
||||
};
|
||||
|
||||
template<>
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
#include <gtsam/base/Matrix.h>
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <type_traits>
|
||||
#include <boost/type_traits.hpp>
|
||||
#include <string>
|
||||
|
||||
namespace gtsam {
|
||||
|
@ -50,7 +50,7 @@ namespace traits {
|
|||
|
||||
// is group, by default this is false
|
||||
template<typename T>
|
||||
struct is_group: public std::false_type {
|
||||
struct is_group: public boost::false_type {
|
||||
};
|
||||
|
||||
// identity, no default provided, by default given by default constructor
|
||||
|
@ -63,11 +63,11 @@ struct identity {
|
|||
|
||||
// is manifold, by default this is false
|
||||
template<typename T>
|
||||
struct is_manifold: public std::false_type {
|
||||
struct is_manifold: public boost::false_type {
|
||||
};
|
||||
|
||||
// dimension, can return Eigen::Dynamic (-1) if not known at compile time
|
||||
typedef std::integral_constant<int, Eigen::Dynamic> Dynamic;
|
||||
typedef boost::integral_constant<int, Eigen::Dynamic> Dynamic;
|
||||
template<typename T>
|
||||
struct dimension : public Dynamic {}; //default to dynamic
|
||||
|
||||
|
@ -83,15 +83,15 @@ template<typename T> struct zero: public identity<T> {
|
|||
// double
|
||||
|
||||
template<>
|
||||
struct is_group<double> : public std::true_type {
|
||||
struct is_group<double> : public boost::true_type {
|
||||
};
|
||||
|
||||
template<>
|
||||
struct is_manifold<double> : public std::true_type {
|
||||
struct is_manifold<double> : public boost::true_type {
|
||||
};
|
||||
|
||||
template<>
|
||||
struct dimension<double> : public std::integral_constant<int, 1> {
|
||||
struct dimension<double> : public boost::integral_constant<int, 1> {
|
||||
};
|
||||
|
||||
template<>
|
||||
|
@ -104,11 +104,11 @@ struct zero<double> {
|
|||
// Fixed size Eigen::Matrix type
|
||||
|
||||
template<int M, int N, int Options>
|
||||
struct is_group<Eigen::Matrix<double, M, N, Options> > : public std::true_type {
|
||||
struct is_group<Eigen::Matrix<double, M, N, Options> > : public boost::true_type {
|
||||
};
|
||||
|
||||
template<int M, int N, int Options>
|
||||
struct is_manifold<Eigen::Matrix<double, M, N, Options> > : public std::true_type {
|
||||
struct is_manifold<Eigen::Matrix<double, M, N, Options> > : public boost::true_type {
|
||||
};
|
||||
|
||||
// TODO: Could be more sophisticated using Eigen traits and SFINAE?
|
||||
|
@ -126,12 +126,12 @@ struct dimension<Eigen::Matrix<double, Eigen::Dynamic, N, Options> > : public Dy
|
|||
};
|
||||
|
||||
template<int M, int N, int Options>
|
||||
struct dimension<Eigen::Matrix<double, M, N, Options> > : public std::integral_constant<
|
||||
struct dimension<Eigen::Matrix<double, M, N, Options> > : public boost::integral_constant<
|
||||
int, M * N> {
|
||||
};
|
||||
|
||||
template<int M, int N, int Options>
|
||||
struct zero<Eigen::Matrix<double, M, N, Options> > : public std::integral_constant<
|
||||
struct zero<Eigen::Matrix<double, M, N, Options> > : public boost::integral_constant<
|
||||
int, M * N> {
|
||||
BOOST_STATIC_ASSERT_MSG((M!=Eigen::Dynamic && N!=Eigen::Dynamic),
|
||||
"traits::zero is only supported for fixed-size matrices");
|
||||
|
@ -140,7 +140,7 @@ struct zero<Eigen::Matrix<double, M, N, Options> > : public std::integral_consta
|
|||
}
|
||||
};
|
||||
|
||||
template <typename T> struct is_chart : public std::false_type {};
|
||||
template <typename T> struct is_chart : public boost::false_type {};
|
||||
|
||||
} // \ namespace traits
|
||||
|
||||
|
@ -164,7 +164,7 @@ struct DefaultChart {
|
|||
|
||||
namespace traits {
|
||||
// populate default traits
|
||||
template <typename T> struct is_chart<DefaultChart<T> > : public std::true_type {};
|
||||
template <typename T> struct is_chart<DefaultChart<T> > : public boost::true_type {};
|
||||
template <typename T> struct dimension<DefaultChart<T> > : public dimension<T> {};
|
||||
}
|
||||
|
||||
|
|
|
@ -189,11 +189,11 @@ private:
|
|||
namespace traits {
|
||||
|
||||
template<>
|
||||
struct is_manifold<Cal3Bundler> : public std::true_type {
|
||||
struct is_manifold<Cal3Bundler> : public boost::true_type {
|
||||
};
|
||||
|
||||
template<>
|
||||
struct dimension<Cal3Bundler> : public std::integral_constant<int, 3> {
|
||||
struct dimension<Cal3Bundler> : public boost::integral_constant<int, 3> {
|
||||
};
|
||||
|
||||
template<>
|
||||
|
|
|
@ -171,11 +171,11 @@ private:
|
|||
namespace traits {
|
||||
|
||||
template<>
|
||||
struct is_manifold<Cal3DS2> : public std::true_type {
|
||||
struct is_manifold<Cal3DS2> : public boost::true_type {
|
||||
};
|
||||
|
||||
template<>
|
||||
struct dimension<Cal3DS2> : public std::integral_constant<int, 9> {
|
||||
struct dimension<Cal3DS2> : public boost::integral_constant<int, 9> {
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -142,11 +142,11 @@ private:
|
|||
namespace traits {
|
||||
|
||||
template<>
|
||||
struct is_manifold<Cal3Unified> : public std::true_type {
|
||||
struct is_manifold<Cal3Unified> : public boost::true_type {
|
||||
};
|
||||
|
||||
template<>
|
||||
struct dimension<Cal3Unified> : public std::integral_constant<int, 10> {
|
||||
struct dimension<Cal3Unified> : public boost::integral_constant<int, 10> {
|
||||
};
|
||||
|
||||
template<>
|
||||
|
|
|
@ -243,11 +243,11 @@ private:
|
|||
namespace traits {
|
||||
|
||||
template<>
|
||||
struct is_manifold<Cal3_S2> : public std::true_type {
|
||||
struct is_manifold<Cal3_S2> : public boost::true_type {
|
||||
};
|
||||
|
||||
template<>
|
||||
struct dimension<Cal3_S2> : public std::integral_constant<int, 5> {
|
||||
struct dimension<Cal3_S2> : public boost::integral_constant<int, 5> {
|
||||
};
|
||||
|
||||
template<>
|
||||
|
|
|
@ -226,15 +226,15 @@ private:
|
|||
namespace traits {
|
||||
|
||||
template<>
|
||||
struct is_group<CalibratedCamera> : public std::true_type {
|
||||
struct is_group<CalibratedCamera> : public boost::true_type {
|
||||
};
|
||||
|
||||
template<>
|
||||
struct is_manifold<CalibratedCamera> : public std::true_type {
|
||||
struct is_manifold<CalibratedCamera> : public boost::true_type {
|
||||
};
|
||||
|
||||
template<>
|
||||
struct dimension<CalibratedCamera> : public std::integral_constant<int, 6> {
|
||||
struct dimension<CalibratedCamera> : public boost::integral_constant<int, 6> {
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -199,11 +199,11 @@ private:
|
|||
namespace traits {
|
||||
|
||||
template<>
|
||||
struct is_manifold<EssentialMatrix> : public std::true_type {
|
||||
struct is_manifold<EssentialMatrix> : public boost::true_type {
|
||||
};
|
||||
|
||||
template<>
|
||||
struct dimension<EssentialMatrix> : public std::integral_constant<int, 5> {
|
||||
struct dimension<EssentialMatrix> : public boost::integral_constant<int, 5> {
|
||||
};
|
||||
|
||||
template<>
|
||||
|
|
|
@ -663,11 +663,11 @@ private:
|
|||
namespace traits {
|
||||
|
||||
template<typename Calibration>
|
||||
struct is_manifold<PinholeCamera<Calibration> > : public std::true_type {
|
||||
struct is_manifold<PinholeCamera<Calibration> > : public boost::true_type {
|
||||
};
|
||||
|
||||
template<typename Calibration>
|
||||
struct dimension<PinholeCamera<Calibration> > : public std::integral_constant<
|
||||
struct dimension<PinholeCamera<Calibration> > : public boost::integral_constant<
|
||||
int, dimension<Pose3>::value + dimension<Calibration>::value> {
|
||||
};
|
||||
|
||||
|
|
|
@ -253,15 +253,15 @@ inline Point2 operator*(double s, const Point2& p) {return p*s;}
|
|||
namespace traits {
|
||||
|
||||
template<>
|
||||
struct is_group<Point2> : public std::true_type {
|
||||
struct is_group<Point2> : public boost::true_type {
|
||||
};
|
||||
|
||||
template<>
|
||||
struct is_manifold<Point2> : public std::true_type {
|
||||
struct is_manifold<Point2> : public boost::true_type {
|
||||
};
|
||||
|
||||
template<>
|
||||
struct dimension<Point2> : public std::integral_constant<int, 2> {
|
||||
struct dimension<Point2> : public boost::integral_constant<int, 2> {
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -245,15 +245,15 @@ namespace gtsam {
|
|||
namespace traits {
|
||||
|
||||
template<>
|
||||
struct is_group<Point3> : public std::true_type {
|
||||
struct is_group<Point3> : public boost::true_type {
|
||||
};
|
||||
|
||||
template<>
|
||||
struct is_manifold<Point3> : public std::true_type {
|
||||
struct is_manifold<Point3> : public boost::true_type {
|
||||
};
|
||||
|
||||
template<>
|
||||
struct dimension<Point3> : public std::integral_constant<int, 3> {
|
||||
struct dimension<Point3> : public boost::integral_constant<int, 3> {
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -324,11 +324,11 @@ GTSAM_EXPORT boost::optional<Pose2> align(const std::vector<Point2Pair>& pairs);
|
|||
namespace traits {
|
||||
|
||||
template<>
|
||||
struct is_manifold<Pose2> : public std::true_type {
|
||||
struct is_manifold<Pose2> : public boost::true_type {
|
||||
};
|
||||
|
||||
template<>
|
||||
struct dimension<Pose2> : public std::integral_constant<int, 3> {
|
||||
struct dimension<Pose2> : public boost::integral_constant<int, 3> {
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -357,15 +357,15 @@ GTSAM_EXPORT boost::optional<Pose3> align(const std::vector<Point3Pair>& pairs);
|
|||
namespace traits {
|
||||
|
||||
template<>
|
||||
struct is_group<Pose3> : public std::true_type {
|
||||
struct is_group<Pose3> : public boost::true_type {
|
||||
};
|
||||
|
||||
template<>
|
||||
struct is_manifold<Pose3> : public std::true_type {
|
||||
struct is_manifold<Pose3> : public boost::true_type {
|
||||
};
|
||||
|
||||
template<>
|
||||
struct dimension<Pose3> : public std::integral_constant<int, 6> {
|
||||
struct dimension<Pose3> : public boost::integral_constant<int, 6> {
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -246,15 +246,15 @@ namespace gtsam {
|
|||
namespace traits {
|
||||
|
||||
template<>
|
||||
struct is_group<Rot2> : public std::true_type {
|
||||
struct is_group<Rot2> : public boost::true_type {
|
||||
};
|
||||
|
||||
template<>
|
||||
struct is_manifold<Rot2> : public std::true_type {
|
||||
struct is_manifold<Rot2> : public boost::true_type {
|
||||
};
|
||||
|
||||
template<>
|
||||
struct dimension<Rot2> : public std::integral_constant<int, 1> {
|
||||
struct dimension<Rot2> : public boost::integral_constant<int, 1> {
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -493,15 +493,15 @@ namespace gtsam {
|
|||
namespace traits {
|
||||
|
||||
template<>
|
||||
struct is_group<Rot3> : public std::true_type {
|
||||
struct is_group<Rot3> : public boost::true_type {
|
||||
};
|
||||
|
||||
template<>
|
||||
struct is_manifold<Rot3> : public std::true_type {
|
||||
struct is_manifold<Rot3> : public boost::true_type {
|
||||
};
|
||||
|
||||
template<>
|
||||
struct dimension<Rot3> : public std::integral_constant<int, 3> {
|
||||
struct dimension<Rot3> : public boost::integral_constant<int, 3> {
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -158,11 +158,11 @@ private:
|
|||
namespace traits {
|
||||
|
||||
template<>
|
||||
struct is_manifold<StereoCamera> : public std::true_type {
|
||||
struct is_manifold<StereoCamera> : public boost::true_type {
|
||||
};
|
||||
|
||||
template<>
|
||||
struct dimension<StereoCamera> : public std::integral_constant<int, 6> {
|
||||
struct dimension<StereoCamera> : public boost::integral_constant<int, 6> {
|
||||
};
|
||||
|
||||
template<>
|
||||
|
|
|
@ -176,15 +176,15 @@ namespace gtsam {
|
|||
namespace traits {
|
||||
|
||||
template<>
|
||||
struct is_group<StereoPoint2> : public std::true_type {
|
||||
struct is_group<StereoPoint2> : public boost::true_type {
|
||||
};
|
||||
|
||||
template<>
|
||||
struct is_manifold<StereoPoint2> : public std::true_type {
|
||||
struct is_manifold<StereoPoint2> : public boost::true_type {
|
||||
};
|
||||
|
||||
template<>
|
||||
struct dimension<StereoPoint2> : public std::integral_constant<int, 3> {
|
||||
struct dimension<StereoPoint2> : public boost::integral_constant<int, 3> {
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -159,11 +159,11 @@ private:
|
|||
namespace traits {
|
||||
|
||||
template<>
|
||||
struct is_manifold<Unit3> : public std::true_type {
|
||||
struct is_manifold<Unit3> : public boost::true_type {
|
||||
};
|
||||
|
||||
template<>
|
||||
struct dimension<Unit3> : public std::integral_constant<int, 2> {
|
||||
struct dimension<Unit3> : public boost::integral_constant<int, 2> {
|
||||
};
|
||||
|
||||
template<>
|
||||
|
|
|
@ -221,15 +221,15 @@ namespace imuBias {
|
|||
namespace traits {
|
||||
|
||||
template<>
|
||||
struct is_group<imuBias::ConstantBias> : public std::true_type {
|
||||
struct is_group<imuBias::ConstantBias> : public boost::true_type {
|
||||
};
|
||||
|
||||
template<>
|
||||
struct is_manifold<imuBias::ConstantBias> : public std::true_type {
|
||||
struct is_manifold<imuBias::ConstantBias> : public boost::true_type {
|
||||
};
|
||||
|
||||
template<>
|
||||
struct dimension<imuBias::ConstantBias> : public std::integral_constant<int, 6> {
|
||||
struct dimension<imuBias::ConstantBias> : public boost::integral_constant<int, 6> {
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -393,7 +393,7 @@ namespace gtsam {
|
|||
// supplied \c filter function.
|
||||
template<class ValueType>
|
||||
static bool filterHelper(const boost::function<bool(Key)> filter, const ConstKeyValuePair& key_value) {
|
||||
BOOST_STATIC_ASSERT((!std::is_same<ValueType, Value>::value));
|
||||
BOOST_STATIC_ASSERT((!boost::is_same<ValueType, Value>::value));
|
||||
// Filter and check the type
|
||||
return filter(key_value.key) && (dynamic_cast<const GenericValue<ValueType>*>(&key_value.value));
|
||||
}
|
||||
|
|
|
@ -64,9 +64,9 @@ public:
|
|||
namespace gtsam {
|
||||
namespace traits {
|
||||
template <>
|
||||
struct is_manifold<TestValue> : public std::true_type {};
|
||||
struct is_manifold<TestValue> : public boost::true_type {};
|
||||
template <>
|
||||
struct dimension<TestValue> : public std::integral_constant<int, 0> {};
|
||||
struct dimension<TestValue> : public boost::integral_constant<int, 0> {};
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -187,11 +187,11 @@ private:
|
|||
namespace traits {
|
||||
|
||||
template<>
|
||||
struct is_manifold<PoseRTV> : public std::true_type {
|
||||
struct is_manifold<PoseRTV> : public boost::true_type {
|
||||
};
|
||||
|
||||
template<>
|
||||
struct dimension<PoseRTV> : public std::integral_constant<int, 9> {
|
||||
struct dimension<PoseRTV> : public boost::integral_constant<int, 9> {
|
||||
};
|
||||
|
||||
template<>
|
||||
|
|
|
@ -144,11 +144,11 @@ private:
|
|||
namespace traits {
|
||||
|
||||
template<>
|
||||
struct is_manifold<Pose3Upright> : public std::true_type {
|
||||
struct is_manifold<Pose3Upright> : public boost::true_type {
|
||||
};
|
||||
|
||||
template<>
|
||||
struct dimension<Pose3Upright> : public std::integral_constant<int, 4> {
|
||||
struct dimension<Pose3Upright> : public boost::integral_constant<int, 4> {
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue