From 9a10242e96e257a0f88ce4d231af6e6d8bb20d8c Mon Sep 17 00:00:00 2001 From: Richard Roberts Date: Fri, 9 Aug 2013 21:35:42 +0000 Subject: [PATCH] Fixed warnings --- gtsam/inference/VariableIndex.h | 5 +---- gtsam/linear/GaussianFactor.h | 2 +- gtsam/linear/HessianFactor.h | 2 +- gtsam/linear/JacobianFactor.h | 2 +- tests/testGraph.cpp | 4 ++-- 5 files changed, 6 insertions(+), 9 deletions(-) diff --git a/gtsam/inference/VariableIndex.h b/gtsam/inference/VariableIndex.h index 4733ca59c..14fbc2072 100644 --- a/gtsam/inference/VariableIndex.h +++ b/gtsam/inference/VariableIndex.h @@ -139,10 +139,7 @@ public: template void remove(ITERATOR firstFactor, ITERATOR lastFactor, const FG& factors); - /** Remove unused empty variables at the end of the ordering (in debug mode - * verifies they are empty). - * @param nToRemove The number of unused variables at the end to remove - */ + /** Remove unused empty variables (in debug mode verifies they are empty). */ template void removeUnusedVariables(ITERATOR firstKey, ITERATOR lastKey); diff --git a/gtsam/linear/GaussianFactor.h b/gtsam/linear/GaussianFactor.h index c8282e8b8..1c9589ce2 100644 --- a/gtsam/linear/GaussianFactor.h +++ b/gtsam/linear/GaussianFactor.h @@ -58,7 +58,7 @@ namespace gtsam { virtual double error(const VectorValues& c) const = 0; /** 0.5*(A*x-b)'*D*(A*x-b) */ /** Return the dimension of the variable pointed to by the given key iterator */ - virtual size_t getDim(const_iterator variable) const = 0; + virtual DenseIndex getDim(const_iterator variable) const = 0; /** * Return a dense \f$ [ \;A\;b\; ] \in \mathbb{R}^{m \times n+1} \f$ diff --git a/gtsam/linear/HessianFactor.h b/gtsam/linear/HessianFactor.h index 866e79f7b..e380c5c38 100644 --- a/gtsam/linear/HessianFactor.h +++ b/gtsam/linear/HessianFactor.h @@ -221,7 +221,7 @@ namespace gtsam { * @param variable An iterator pointing to the slot in this factor. You can * use, for example, begin() + 2 to get the 3rd variable in this factor. */ - virtual size_t getDim(const_iterator variable) const { return info_(variable-this->begin(), 0).rows(); } + virtual DenseIndex getDim(const_iterator variable) const { return info_(variable-this->begin(), 0).rows(); } /** Return the number of columns and rows of the Hessian matrix, including the information vector. */ size_t rows() const { return info_.rows(); } diff --git a/gtsam/linear/JacobianFactor.h b/gtsam/linear/JacobianFactor.h index f1d66db77..e3412c79d 100644 --- a/gtsam/linear/JacobianFactor.h +++ b/gtsam/linear/JacobianFactor.h @@ -227,7 +227,7 @@ namespace gtsam { /** Return the dimension of the variable pointed to by the given key iterator * todo: Remove this in favor of keeping track of dimensions with variables? */ - virtual size_t getDim(const_iterator variable) const { return Ab_(variable - begin()).cols(); } + virtual DenseIndex getDim(const_iterator variable) const { return Ab_(variable - begin()).cols(); } /** * return the number of rows in the corresponding linear system diff --git a/tests/testGraph.cpp b/tests/testGraph.cpp index ecd21b659..842f2bd67 100644 --- a/tests/testGraph.cpp +++ b/tests/testGraph.cpp @@ -70,7 +70,7 @@ TEST( Graph, predecessorMap2Graph ) p_map.insert(3, 2); boost::tie(graph, root, key2vertex) = predecessorMap2Graph, SVertex, Key>(p_map); - LONGS_EQUAL(3, boost::num_vertices(graph)); + LONGS_EQUAL(3, (long)boost::num_vertices(graph)); CHECK(root == key2vertex[2]); } @@ -101,7 +101,7 @@ TEST( Graph, composePoses ) expected.insert(3, p3); expected.insert(4, p4); - LONGS_EQUAL(4, actual->size()); + LONGS_EQUAL(4, (long)actual->size()); CHECK(assert_equal(expected, *actual)); }