diff --git a/gtsam/base/tests/timeVirtual.cpp b/gtsam/base/tests/timeVirtual.cpp index a61ce7b77..697a219b1 100644 --- a/gtsam/base/tests/timeVirtual.cpp +++ b/gtsam/base/tests/timeVirtual.cpp @@ -87,13 +87,13 @@ int main(int argc, char *argv[]) { tic_("shared plain alloc, dealloc"); for(size_t i=0; i obj(new Plain(i)); + boost::shared_ptr obj(new Plain(i)); } toc_("shared plain alloc, dealloc"); tic_("shared virtual alloc, dealloc"); for(size_t i=0; i obj(new Virtual(i)); + boost::shared_ptr obj(new Virtual(i)); } toc_("shared virtual alloc, dealloc"); @@ -130,14 +130,14 @@ int main(int argc, char *argv[]) { tic_("shared plain alloc, dealloc, call"); for(size_t i=0; i obj(new Plain(i)); + boost::shared_ptr obj(new Plain(i)); obj->setData(i+1); } toc_("shared plain alloc, dealloc, call"); tic_("shared virtual alloc, dealloc, call"); for(size_t i=0; i obj(new Virtual(i)); + boost::shared_ptr obj(new Virtual(i)); obj->setData(i+1); } toc_("shared virtual alloc, dealloc, call"); diff --git a/gtsam/base/types.h b/gtsam/base/types.h index e9264d516..2490a0cde 100644 --- a/gtsam/base/types.h +++ b/gtsam/base/types.h @@ -82,6 +82,12 @@ using boost::math::isinf; #ifndef M_PI #define M_PI (boost::math::constants::pi()) #endif +#ifndef M_PI_2 +#define M_PI_2 (boost::math::constants::pi() / 2.0) +#endif +#ifndef M_PI_4 +#define M_PI_4 (boost::math::constants::pi() / 4.0) +#endif #endif diff --git a/gtsam/geometry/StereoPoint2.h b/gtsam/geometry/StereoPoint2.h index 43701e4e8..022296c21 100644 --- a/gtsam/geometry/StereoPoint2.h +++ b/gtsam/geometry/StereoPoint2.h @@ -119,6 +119,11 @@ namespace gtsam { return p.vector(); } + /** The difference between another point and this point */ + inline StereoPoint2 between(const StereoPoint2& p2) const { + return gtsam::between_default(*this, p2); + } + /// @} /// @name Standard Interface /// @{ @@ -133,11 +138,6 @@ namespace gtsam { return Point2(uL_, v_); } - ///TODO comment - inline StereoPoint2 between(const StereoPoint2& p2) const { - return gtsam::between_default(*this, p2); - } - private: /// @} diff --git a/tests/testGraph.cpp b/tests/testGraph.cpp index c75c42b49..63cbd43c8 100644 --- a/tests/testGraph.cpp +++ b/tests/testGraph.cpp @@ -66,7 +66,7 @@ TEST( Graph, predecessorMap2Graph ) p_map.insert(1, 2); p_map.insert(2, 2); p_map.insert(3, 2); - tie(graph, root, key2vertex) = predecessorMap2Graph, SVertex, Key>(p_map); + boost::tie(graph, root, key2vertex) = predecessorMap2Graph, SVertex, Key>(p_map); LONGS_EQUAL(3, boost::num_vertices(graph)); CHECK(root == key2vertex[2]); diff --git a/tests/timeMultifrontalOnDataset.cpp b/tests/timeMultifrontalOnDataset.cpp index 874ccf8bb..3d8ccf77e 100644 --- a/tests/timeMultifrontalOnDataset.cpp +++ b/tests/timeMultifrontalOnDataset.cpp @@ -44,7 +44,7 @@ int main(int argc, char *argv[]) { else if (argc == 4) nrTrials = strtoul(argv[3], NULL, 10); - pair, shared_ptr > data = load2D(dataset(datasetname)); + pair, boost::shared_ptr > data = load2D(dataset(datasetname)); // Add a prior on the first pose if (soft_prior) diff --git a/tests/timeSequentialOnDataset.cpp b/tests/timeSequentialOnDataset.cpp index 9e1b986f9..a37b9910c 100644 --- a/tests/timeSequentialOnDataset.cpp +++ b/tests/timeSequentialOnDataset.cpp @@ -44,7 +44,7 @@ int main(int argc, char *argv[]) { else if (argc == 4) nrTrials = strtoul(argv[3], NULL, 10); - pair, shared_ptr > data = load2D(dataset(datasetname)); + pair, boost::shared_ptr > data = load2D(dataset(datasetname)); // Add a prior on the first pose if (soft_prior)