diff --git a/cpp/ISAM2-inl.h b/cpp/ISAM2-inl.h index a71c57cab..59dfa06eb 100644 --- a/cpp/ISAM2-inl.h +++ b/cpp/ISAM2-inl.h @@ -75,11 +75,11 @@ namespace gtsam { /* ************************************************************************* */ template - list ISAM2::getAffectedFactors(const list& keys) const { + list ISAM2::getAffectedFactors(const list& keys) const { FactorGraph > allAffected; - list indices; + list indices; BOOST_FOREACH(const Symbol& key, keys) { - const list l = nonlinearFactors_.factors(key); + const list l = nonlinearFactors_.factors(key); indices.insert(indices.begin(), l.begin(), l.end()); } indices.sort(); @@ -96,11 +96,11 @@ namespace gtsam { list affectedKeysList; // todo: shouldn't have to convert back to list... affectedKeysList.insert(affectedKeysList.begin(), affectedKeys.begin(), affectedKeys.end()); - list candidates = getAffectedFactors(affectedKeysList); + list candidates = getAffectedFactors(affectedKeysList); NonlinearFactorGraph nonlinearAffectedFactors; - BOOST_FOREACH(int idx, candidates) { + BOOST_FOREACH(size_t idx, candidates) { bool inside = true; BOOST_FOREACH(const Symbol& key, nonlinearFactors_[idx]->keys()) { if (affectedKeys.find(key) == affectedKeys.end()) { @@ -168,7 +168,7 @@ namespace gtsam { // mark variables that have to be removed as invalid (removeFATtop) // basically calculate all the keys contained in the factors that contain any of the keys... // the goal is to relinearize all variables directly affected by new factors - list allAffected = getAffectedFactors(marked_); + list allAffected = getAffectedFactors(marked_); set accumulate; BOOST_FOREACH(int idx, allAffected) { list tmp = nonlinearFactors_[idx]->keys(); diff --git a/cpp/ISAM2.h b/cpp/ISAM2.h index a733d4aad..5419bd58a 100644 --- a/cpp/ISAM2.h +++ b/cpp/ISAM2.h @@ -97,7 +97,7 @@ namespace gtsam { private: - std::list getAffectedFactors(const std::list& keys) const; + std::list getAffectedFactors(const std::list& keys) const; boost::shared_ptr relinearizeAffectedFactors(const std::set& affectedKeys) const; FactorGraph getCachedBoundaryFactors(Cliques& orphans); diff --git a/cpp/simulated2DOriented.h b/cpp/simulated2DOriented.h index 75b6d2609..c0a70ca19 100644 --- a/cpp/simulated2DOriented.h +++ b/cpp/simulated2DOriented.h @@ -71,7 +71,7 @@ namespace gtsam { GenericOdometry(const Pose2& z, const SharedGaussian& model, const Key& i1, const Key& i2) : - z_(z), NonlinearFactor2 (model, i1, i2) { + NonlinearFactor2 (model, i1, i2), z_(z) { } Vector evaluateError(const Pose2& x1, const Pose2& x2, boost::optional< diff --git a/cpp/testConstraintOptimizer.cpp b/cpp/testConstraintOptimizer.cpp index d076b4ed6..f0fdd5d75 100644 --- a/cpp/testConstraintOptimizer.cpp +++ b/cpp/testConstraintOptimizer.cpp @@ -376,7 +376,7 @@ TEST( matrix, line_search ) { double init_error = penalty(x0), final_error = penalty(x0 + actual); - double actual_stepsize = dot(actual, delta)/dot(delta, delta); + //double actual_stepsize = dot(actual, delta)/dot(delta, delta); // cout << "actual_stepsize: " << actual_stepsize << endl; CHECK(final_error <= init_error); diff --git a/cpp/testGaussianFactorGraph.cpp b/cpp/testGaussianFactorGraph.cpp index 54a139191..af04dcc9c 100644 --- a/cpp/testGaussianFactorGraph.cpp +++ b/cpp/testGaussianFactorGraph.cpp @@ -528,15 +528,15 @@ TEST( GaussianFactorGraph, factor_lookup) GaussianFactorGraph fg = createGaussianFactorGraph(); // ask for all factor indices connected to x1 - list x1_factors = fg.factors("x1"); - int x1_indices[] = { 0, 1, 2 }; - list x1_expected(x1_indices, x1_indices + 3); + list x1_factors = fg.factors("x1"); + size_t x1_indices[] = { 0, 1, 2 }; + list x1_expected(x1_indices, x1_indices + 3); CHECK(x1_factors==x1_expected); // ask for all factor indices connected to x2 - list x2_factors = fg.factors("x2"); - int x2_indices[] = { 1, 3 }; - list x2_expected(x2_indices, x2_indices + 2); + list x2_factors = fg.factors("x2"); + size_t x2_indices[] = { 1, 3 }; + list x2_expected(x2_indices, x2_indices + 2); CHECK(x2_factors==x2_expected); } diff --git a/cpp/testIterative.cpp b/cpp/testIterative.cpp index 1f841fae9..c0f7e6efe 100644 --- a/cpp/testIterative.cpp +++ b/cpp/testIterative.cpp @@ -80,8 +80,8 @@ TEST( Iterative, conjugateGradientDescent ) CHECK(assert_equal(expected,actual2,1e-2)); } -/* ************************************************************************* * -TEST( Iterative, conjugateGradientDescent_hard_constraint ) +/* ************************************************************************* */ +/*TEST( Iterative, conjugateGradientDescent_hard_constraint ) { typedef Pose2Config::Key Key; @@ -105,7 +105,7 @@ TEST( Iterative, conjugateGradientDescent_hard_constraint ) expected.insert("x1", zero(3)); expected.insert("x2", Vector_(-0.5,0.,0.)); CHECK(assert_equal(expected, actual)); -} +}*/ /* ************************************************************************* */ TEST( Iterative, conjugateGradientDescent_soft_constraint ) diff --git a/cpp/testLieConfig.cpp b/cpp/testLieConfig.cpp index a7c2049b3..876704a2a 100644 --- a/cpp/testLieConfig.cpp +++ b/cpp/testLieConfig.cpp @@ -162,8 +162,8 @@ TEST(LieConfig, expmap_c) CHECK(assert_equal(expected, expmap(config0, increment))); } -/* ************************************************************************* * -TEST(LieConfig, expmap_d) +/* ************************************************************************* */ +/*TEST(LieConfig, expmap_d) { LieConfig config0; config0.insert("v1", Vector_(3, 1.0, 2.0, 3.0)); @@ -178,10 +178,10 @@ TEST(LieConfig, expmap_d) //poseconfig.print("poseconfig"); CHECK(equal(config0, config0)); CHECK(config0.equals(config0)); -} +}*/ -/* ************************************************************************* * -TEST(LieConfig, extract_keys) +/* ************************************************************************* */ +/*TEST(LieConfig, extract_keys) { typedef TypedSymbol PoseKey; LieConfig config; @@ -200,7 +200,7 @@ TEST(LieConfig, extract_keys) for (; itAct != actual.end() && itExp != expected.end(); ++itAct, ++itExp) { CHECK(assert_equal(*itExp, *itAct)); } -} +}*/ /* ************************************************************************* */ TEST(LieConfig, exists_) diff --git a/cpp/testSQP.cpp b/cpp/testSQP.cpp index f1915a197..dc4bb7ba8 100644 --- a/cpp/testSQP.cpp +++ b/cpp/testSQP.cpp @@ -767,7 +767,6 @@ TEST (SQP, stereo_sqp ) { * with noise in the initial estimate */ TEST (SQP, stereo_sqp_noisy ) { - bool verbose = false; // get a graph boost::shared_ptr graph = stereoExampleGraph(); diff --git a/cpp/testSymbolicFactorGraph.cpp b/cpp/testSymbolicFactorGraph.cpp index 57775c07e..d2a0a12dd 100644 --- a/cpp/testSymbolicFactorGraph.cpp +++ b/cpp/testSymbolicFactorGraph.cpp @@ -66,15 +66,15 @@ TEST( SymbolicFactorGraph, factors) SymbolicFactorGraph fg(factorGraph); // ask for all factor indices connected to x1 - list x1_factors = fg.factors("x1"); + list x1_factors = fg.factors("x1"); int x1_indices[] = { 0, 1, 2 }; - list x1_expected(x1_indices, x1_indices + 3); + list x1_expected(x1_indices, x1_indices + 3); CHECK(x1_factors==x1_expected); // ask for all factor indices connected to x2 - list x2_factors = fg.factors("x2"); + list x2_factors = fg.factors("x2"); int x2_indices[] = { 1, 3 }; - list x2_expected(x2_indices, x2_indices + 2); + list x2_expected(x2_indices, x2_indices + 2); CHECK(x2_factors==x2_expected); }