diff --git a/gtsam/nonlinear/tests/testExpression.cpp b/gtsam/nonlinear/tests/testExpression.cpp index 43f1cd017..8f059f84c 100644 --- a/gtsam/nonlinear/tests/testExpression.cpp +++ b/gtsam/nonlinear/tests/testExpression.cpp @@ -17,7 +17,7 @@ * @brief unit tests for Block Automatic Differentiation */ -#include +#include #include #include #include @@ -32,9 +32,7 @@ using boost::assign::map_list_of; using namespace std; using namespace gtsam; -typedef Expression double_; typedef Expression Point3_; -typedef Expression Vector3_; typedef Expression Pose3_; typedef Expression Rot3_; @@ -101,7 +99,7 @@ TEST(Expression, Unary1) { } TEST(Expression, Unary2) { using namespace unary; - double_ e(f2, p); + Double_ e(f2, p); EXPECT(expected == e.keys()); } @@ -156,7 +154,7 @@ Point3_ p_cam(x, &Pose3::transform_to, p); // Check that creating an expression to double compiles TEST(Expression, BinaryToDouble) { using namespace binary; - double_ p_cam(doubleF, x, p); + Double_ p_cam(doubleF, x, p); } /* ************************************************************************* */ @@ -372,8 +370,8 @@ TEST(Expression, TripleSum) { /* ************************************************************************* */ TEST(Expression, SumOfUnaries) { const Key key(67); - const double_ norm_(>sam::norm, Point3_(key)); - const double_ sum_ = norm_ + norm_; + const Double_ norm_(>sam::norm, Point3_(key)); + const Double_ sum_ = norm_ + norm_; Values values; values.insert(key, Point3(6, 0, 0)); @@ -391,7 +389,7 @@ TEST(Expression, SumOfUnaries) { TEST(Expression, UnaryOfSum) { const Key key1(42), key2(67); const Point3_ sum_ = Point3_(key1) + Point3_(key2); - const double_ norm_(>sam::norm, sum_); + const Double_ norm_(>sam::norm, sum_); map actual_dims, expected_dims = map_list_of(key1, 3)(key2, 3); norm_.dims(actual_dims); diff --git a/gtsam_unstable/slam/TOAFactor.h b/gtsam_unstable/slam/TOAFactor.h index b500b36e3..e37e8ff20 100644 --- a/gtsam_unstable/slam/TOAFactor.h +++ b/gtsam_unstable/slam/TOAFactor.h @@ -17,7 +17,7 @@ * @date December 2014 */ -#include +#include #include namespace gtsam { @@ -25,7 +25,7 @@ namespace gtsam { /// A "Time of Arrival" factor - so little code seems hardly worth it :-) class TOAFactor: public ExpressionFactor { - typedef Expression double_; + typedef Expression Double_; public: @@ -40,7 +40,7 @@ public: const Expression& microphone_, double toaMeasurement, const SharedNoiseModel& model) : ExpressionFactor(model, toaMeasurement, - double_(&Event::toa, eventExpression, microphone_)) { + Double_(&Event::toa, eventExpression, microphone_)) { } }; diff --git a/gtsam_unstable/slam/tests/testTOAFactor.cpp b/gtsam_unstable/slam/tests/testTOAFactor.cpp index 52786702d..233dbdceb 100644 --- a/gtsam_unstable/slam/tests/testTOAFactor.cpp +++ b/gtsam_unstable/slam/tests/testTOAFactor.cpp @@ -31,7 +31,6 @@ using namespace std; using namespace gtsam; // typedefs -typedef Eigen::Matrix Vector1; typedef Expression Point3_; typedef Expression Event_; @@ -52,7 +51,7 @@ TEST( TOAFactor, NewWay ) { Event_ eventExpression(key); Point3_ microphoneConstant(microphoneAt0); // constant expression double measurement = 7; - double_ expression(&Event::toa, eventExpression, microphoneConstant); + Double_ expression(&Event::toa, eventExpression, microphoneConstant); ExpressionFactor factor(model, measurement, expression); } @@ -92,7 +91,7 @@ TEST( TOAFactor, WholeEnchilada ) { Event_ eventExpression(key); for (size_t i = 0; i < K; i++) { Point3_ microphone_i(microphones[i]); // constant expression - double_ predictTOA(&Event::toa, eventExpression, microphone_i); + Double_ predictTOA(&Event::toa, eventExpression, microphone_i); graph.addExpressionFactor(predictTOA, simulatedTOA[i], model); }