From e17baac774b096f5fbce12ca34610cce0a1d2b74 Mon Sep 17 00:00:00 2001 From: Mike Bosse Date: Wed, 17 Dec 2014 17:06:24 +0100 Subject: [PATCH] more progress --- gtsam/base/LieScalar.h | 30 ------------------------------ gtsam/geometry/PinholeCamera.h | 2 +- 2 files changed, 1 insertion(+), 31 deletions(-) diff --git a/gtsam/base/LieScalar.h b/gtsam/base/LieScalar.h index bcb042d95..500f83ec3 100644 --- a/gtsam/base/LieScalar.h +++ b/gtsam/base/LieScalar.h @@ -30,7 +30,6 @@ namespace gtsam { * we can directly add double, Vector, and Matrix into values now, because of * gtsam::traits. */ -#if 0 struct GTSAM_EXPORT LieScalar { enum { dimension = 1 }; @@ -118,35 +117,6 @@ namespace gtsam { private: double d_; }; -#endif - - struct GTSAM_EXPORT LieScalar { - - enum { dimension = 1 }; - - /** default constructor */ - LieScalar() : d_(0.0) {} - - /** wrap a double */ - /*explicit*/ LieScalar(double d) : d_(d) {} - - /** access the underlying value */ - double value() const { return d_; } - - /** Automatic conversion to underlying value */ - operator double() const { return d_; } - - /** print @param name optional string naming the object */ - void print(const std::string& name="") const; - - /** equality up to tolerance */ - bool equals(const LieScalar& expected, double tol=1e-5) const { - return fabs(expected.d_ - d_) <= tol; - } - - private: - double d_; - }; template<> struct traits_x : public internal::ScalarTraits {}; diff --git a/gtsam/geometry/PinholeCamera.h b/gtsam/geometry/PinholeCamera.h index 65958ca0b..a3e241a78 100644 --- a/gtsam/geometry/PinholeCamera.h +++ b/gtsam/geometry/PinholeCamera.h @@ -409,7 +409,7 @@ public: *Dcamera << Dcamera_, Eigen::Matrix::Zero(); } if (Dother) { - Dother->resize(1, 6+traits::dimension::value); + Dother->resize(1, 6+CalibrationB::dimension); Dother->setZero(); Dother->block(0, 0, 1, 6) = Dother_; }