diff --git a/examples/CameraResectioning.cpp b/examples/CameraResectioning.cpp index d26b8b3af..aee073df7 100644 --- a/examples/CameraResectioning.cpp +++ b/examples/CameraResectioning.cpp @@ -23,7 +23,7 @@ #include #include #include -#include +#include using namespace gtsam; diff --git a/examples/PlanarSLAMSelfContained_advanced.cpp b/examples/PlanarSLAMSelfContained_advanced.cpp index c8ee21997..d915a9ebd 100644 --- a/examples/PlanarSLAMSelfContained_advanced.cpp +++ b/examples/PlanarSLAMSelfContained_advanced.cpp @@ -35,8 +35,8 @@ // implementations for structures - needed if self-contained, and these should be included last #include -#include -#include +#include +#include #include #include diff --git a/examples/Pose2SLAMExample_advanced.cpp b/examples/Pose2SLAMExample_advanced.cpp index 13e419def..703f6a47d 100644 --- a/examples/Pose2SLAMExample_advanced.cpp +++ b/examples/Pose2SLAMExample_advanced.cpp @@ -22,7 +22,7 @@ // pull in the Pose2 SLAM domain with all typedefs and helper functions defined #include -#include +#include #include #include diff --git a/examples/Pose2SLAMExample_easy.cpp b/examples/Pose2SLAMExample_easy.cpp index 1e48157f0..68ece651b 100644 --- a/examples/Pose2SLAMExample_easy.cpp +++ b/examples/Pose2SLAMExample_easy.cpp @@ -24,7 +24,7 @@ // pull in the Pose2 SLAM domain with all typedefs and helper functions defined #include -#include +#include using namespace std; using namespace gtsam; diff --git a/examples/Pose2SLAMwSPCG_advanced.cpp b/examples/Pose2SLAMwSPCG_advanced.cpp index 4b91d625c..b298ed92a 100644 --- a/examples/Pose2SLAMwSPCG_advanced.cpp +++ b/examples/Pose2SLAMwSPCG_advanced.cpp @@ -19,8 +19,8 @@ #include #include -#include -#include +#include +#include using namespace std; using namespace gtsam; diff --git a/examples/Pose2SLAMwSPCG_easy.cpp b/examples/Pose2SLAMwSPCG_easy.cpp index d1a33678c..3cce81d48 100644 --- a/examples/Pose2SLAMwSPCG_easy.cpp +++ b/examples/Pose2SLAMwSPCG_easy.cpp @@ -19,7 +19,7 @@ #include #include -#include +#include using namespace std; diff --git a/examples/SimpleRotation.cpp b/examples/SimpleRotation.cpp index 438459e64..9d897dd39 100644 --- a/examples/SimpleRotation.cpp +++ b/examples/SimpleRotation.cpp @@ -24,8 +24,8 @@ #include #include #include -#include -#include +#include +#include /* * TODO: make factors independent of RotValues diff --git a/examples/vSLAMexample/vISAMexample.cpp b/examples/vSLAMexample/vISAMexample.cpp index bd35e3636..6cdc34f17 100644 --- a/examples/vSLAMexample/vISAMexample.cpp +++ b/examples/vSLAMexample/vISAMexample.cpp @@ -23,8 +23,8 @@ using namespace boost; // Magically casts strings like "x3" to a Symbol('x',3) key, see Key.h #define GTSAM_MAGIC_KEY -#include -#include +#include +#include #include #include #include diff --git a/examples/vSLAMexample/vSFMexample.cpp b/examples/vSLAMexample/vSFMexample.cpp index 6aaf04442..9dc8bfe34 100644 --- a/examples/vSLAMexample/vSFMexample.cpp +++ b/examples/vSLAMexample/vSFMexample.cpp @@ -22,8 +22,8 @@ using namespace boost; // Magically casts strings like "x3" to a Symbol('x',3) key, see Key.h #define GTSAM_MAGIC_KEY -#include -#include +#include +#include #include #include #include diff --git a/gtsam/linear/SubgraphSolver-inl.h b/gtsam/linear/SubgraphSolver-inl.h index 6bf36cc32..63a497ac1 100644 --- a/gtsam/linear/SubgraphSolver-inl.h +++ b/gtsam/linear/SubgraphSolver-inl.h @@ -13,9 +13,8 @@ #include -#include #include -#include +#include using namespace std; diff --git a/gtsam/linear/SubgraphSolver.h b/gtsam/linear/SubgraphSolver.h index c644e6f77..539f102e6 100644 --- a/gtsam/linear/SubgraphSolver.h +++ b/gtsam/linear/SubgraphSolver.h @@ -95,4 +95,6 @@ private: SubgraphSolver():IterativeSolver(){} }; -} // nsamespace gtsam +} // namespace gtsam + +#include diff --git a/gtsam/nonlinear/DoglegOptimizerImpl.h b/gtsam/nonlinear/DoglegOptimizerImpl.h index f843a9185..5668f2524 100644 --- a/gtsam/nonlinear/DoglegOptimizerImpl.h +++ b/gtsam/nonlinear/DoglegOptimizerImpl.h @@ -7,7 +7,7 @@ #include #include // To get optimize(BayesTree) -#include +#include #include namespace gtsam { diff --git a/gtsam/nonlinear/ExtendedKalmanFilter.h b/gtsam/nonlinear/ExtendedKalmanFilter.h index 1de95ecf1..9717307bf 100644 --- a/gtsam/nonlinear/ExtendedKalmanFilter.h +++ b/gtsam/nonlinear/ExtendedKalmanFilter.h @@ -19,7 +19,7 @@ // \callgraph #pragma once -#include +#include #include namespace gtsam { diff --git a/gtsam/nonlinear/NonlinearFactorGraph-inl.h b/gtsam/nonlinear/NonlinearFactorGraph-inl.h index 8a7b0fcb9..621f3b91b 100644 --- a/gtsam/nonlinear/NonlinearFactorGraph-inl.h +++ b/gtsam/nonlinear/NonlinearFactorGraph-inl.h @@ -19,16 +19,11 @@ #pragma once -#include -#include +#include #include #include #include -#define INSTANTIATE_NONLINEAR_FACTOR_GRAPH(C) \ - INSTANTIATE_FACTOR_GRAPH(NonlinearFactor); \ - template class NonlinearFactorGraph; - using namespace std; namespace gtsam { diff --git a/gtsam/nonlinear/NonlinearFactorGraph.h b/gtsam/nonlinear/NonlinearFactorGraph.h index 2cea72e7e..e17083f60 100644 --- a/gtsam/nonlinear/NonlinearFactorGraph.h +++ b/gtsam/nonlinear/NonlinearFactorGraph.h @@ -100,3 +100,5 @@ namespace gtsam { }; } // namespace + +#include diff --git a/gtsam/nonlinear/NonlinearOptimization-inl.h b/gtsam/nonlinear/NonlinearOptimization-inl.h index 178ef646d..36d3cccd0 100644 --- a/gtsam/nonlinear/NonlinearOptimization-inl.h +++ b/gtsam/nonlinear/NonlinearOptimization-inl.h @@ -20,10 +20,9 @@ #include #include -#include -#include -#include +#include +#include using namespace std; diff --git a/gtsam/nonlinear/NonlinearOptimization.h b/gtsam/nonlinear/NonlinearOptimization.h index 2d3416ef3..a477d4fd5 100644 --- a/gtsam/nonlinear/NonlinearOptimization.h +++ b/gtsam/nonlinear/NonlinearOptimization.h @@ -50,3 +50,4 @@ namespace gtsam { } +#include diff --git a/gtsam/nonlinear/NonlinearOptimizer-inl.h b/gtsam/nonlinear/NonlinearOptimizer-inl.h index 31bed03cc..3a731e588 100644 --- a/gtsam/nonlinear/NonlinearOptimizer-inl.h +++ b/gtsam/nonlinear/NonlinearOptimizer-inl.h @@ -23,12 +23,8 @@ #include #include #include -#include #include -#define INSTANTIATE_NONLINEAR_OPTIMIZER(G,C) \ - template class NonlinearOptimizer; - using namespace std; namespace gtsam { diff --git a/gtsam/nonlinear/NonlinearOptimizer.h b/gtsam/nonlinear/NonlinearOptimizer.h index db92fc58a..4073df424 100644 --- a/gtsam/nonlinear/NonlinearOptimizer.h +++ b/gtsam/nonlinear/NonlinearOptimizer.h @@ -419,3 +419,5 @@ bool check_convergence ( double currentError, double newError); } // gtsam + +#include diff --git a/gtsam/slam/planarSLAM.cpp b/gtsam/slam/planarSLAM.cpp index ae47a6e7d..c90e56be9 100644 --- a/gtsam/slam/planarSLAM.cpp +++ b/gtsam/slam/planarSLAM.cpp @@ -16,16 +16,13 @@ **/ #include -#include -#include -#include +#include +#include +#include // Use planarSLAM namespace for specific SLAM instance namespace gtsam { - INSTANTIATE_NONLINEAR_FACTOR_GRAPH(planarSLAM::Values) - INSTANTIATE_NONLINEAR_OPTIMIZER(planarSLAM::Graph, planarSLAM::Values) - namespace planarSLAM { Graph::Graph(const NonlinearFactorGraph& graph) : diff --git a/gtsam/slam/pose2SLAM.cpp b/gtsam/slam/pose2SLAM.cpp index 0eaaeaca1..86dd3ea16 100644 --- a/gtsam/slam/pose2SLAM.cpp +++ b/gtsam/slam/pose2SLAM.cpp @@ -16,14 +16,12 @@ **/ #include -#include -#include +#include +#include // Use pose2SLAM namespace for specific SLAM instance namespace gtsam { - INSTANTIATE_NONLINEAR_FACTOR_GRAPH(pose2SLAM::Values) - INSTANTIATE_NONLINEAR_OPTIMIZER(pose2SLAM::Graph, pose2SLAM::Values) template class NonlinearOptimizer; namespace pose2SLAM { diff --git a/gtsam/slam/pose3SLAM.cpp b/gtsam/slam/pose3SLAM.cpp index 4f4618896..102652813 100644 --- a/gtsam/slam/pose3SLAM.cpp +++ b/gtsam/slam/pose3SLAM.cpp @@ -16,15 +16,12 @@ **/ #include -#include -#include +#include +#include // Use pose3SLAM namespace for specific SLAM instance namespace gtsam { - INSTANTIATE_NONLINEAR_FACTOR_GRAPH(pose3SLAM::Values) - INSTANTIATE_NONLINEAR_OPTIMIZER(pose3SLAM::Graph, pose3SLAM::Values) - namespace pose3SLAM { /* ************************************************************************* */ diff --git a/gtsam/slam/smallExample.cpp b/gtsam/slam/smallExample.cpp index 8f09c60e7..40d3e98ff 100644 --- a/gtsam/slam/smallExample.cpp +++ b/gtsam/slam/smallExample.cpp @@ -32,9 +32,9 @@ using namespace std; #include // template definitions -#include +#include #include -#include +#include namespace gtsam { namespace example { diff --git a/gtsam/slam/tests/testGeneralSFMFactor.cpp b/gtsam/slam/tests/testGeneralSFMFactor.cpp index 4316aadc6..8f9c9d09e 100644 --- a/gtsam/slam/tests/testGeneralSFMFactor.cpp +++ b/gtsam/slam/tests/testGeneralSFMFactor.cpp @@ -16,9 +16,9 @@ using namespace boost; #define GTSAM_MAGIC_KEY #include -#include -#include -#include +#include +#include +#include #include #include #include diff --git a/gtsam/slam/tests/testGeneralSFMFactor_Cal3Bundler.cpp b/gtsam/slam/tests/testGeneralSFMFactor_Cal3Bundler.cpp index f42cb6e9c..3f4e6df6f 100644 --- a/gtsam/slam/tests/testGeneralSFMFactor_Cal3Bundler.cpp +++ b/gtsam/slam/tests/testGeneralSFMFactor_Cal3Bundler.cpp @@ -16,9 +16,9 @@ using namespace boost; #define GTSAM_MAGIC_KEY #include -#include -#include -#include +#include +#include +#include #include #include #include diff --git a/gtsam/slam/tests/testPose2SLAM.cpp b/gtsam/slam/tests/testPose2SLAM.cpp index 7068f99bf..c2c11b937 100644 --- a/gtsam/slam/tests/testPose2SLAM.cpp +++ b/gtsam/slam/tests/testPose2SLAM.cpp @@ -18,8 +18,8 @@ #define GTSAM_MAGIC_KEY #include -#include -#include +#include +#include #include using namespace gtsam; diff --git a/gtsam/slam/tests/testStereoFactor.cpp b/gtsam/slam/tests/testStereoFactor.cpp index 3cf84538b..50a84d8b6 100644 --- a/gtsam/slam/tests/testStereoFactor.cpp +++ b/gtsam/slam/tests/testStereoFactor.cpp @@ -20,11 +20,11 @@ #include #include -#include -#include +#include +#include #include -#include +#include #include using namespace std; diff --git a/gtsam/slam/tests/testVSLAM.cpp b/gtsam/slam/tests/testVSLAM.cpp index 1b225f3d7..c25b4260d 100644 --- a/gtsam/slam/tests/testVSLAM.cpp +++ b/gtsam/slam/tests/testVSLAM.cpp @@ -25,9 +25,9 @@ using namespace boost; // Magically casts strings like "x3" to a Symbol('x',3) key, see Key.h #define GTSAM_MAGIC_KEY -#include -#include -#include +#include +#include +#include #include using namespace std; diff --git a/gtsam/slam/visualSLAM.cpp b/gtsam/slam/visualSLAM.cpp index 5a8200dd0..67e77dc15 100644 --- a/gtsam/slam/visualSLAM.cpp +++ b/gtsam/slam/visualSLAM.cpp @@ -16,12 +16,9 @@ */ #include -#include -#include +#include +#include namespace gtsam { - INSTANTIATE_NONLINEAR_FACTOR_GRAPH(visualSLAM::Values) - INSTANTIATE_NONLINEAR_OPTIMIZER(visualSLAM::Graph, visualSLAM::Values) - } diff --git a/tests/testBoundingConstraint.cpp b/tests/testBoundingConstraint.cpp index 8bad3cb2a..062a04ed6 100644 --- a/tests/testBoundingConstraint.cpp +++ b/tests/testBoundingConstraint.cpp @@ -18,8 +18,8 @@ #include #include -#include -#include +#include +#include namespace iq2D = gtsam::simulated2D::inequality_constraints; using namespace std; diff --git a/tests/testNonlinearFactor.cpp b/tests/testNonlinearFactor.cpp index 9917273b9..095f562a4 100644 --- a/tests/testNonlinearFactor.cpp +++ b/tests/testNonlinearFactor.cpp @@ -34,7 +34,7 @@ #include #include #include -#include +#include using namespace std; using namespace gtsam; diff --git a/tests/testNonlinearFactorGraph.cpp b/tests/testNonlinearFactorGraph.cpp index 74e675777..6b926c6d7 100644 --- a/tests/testNonlinearFactorGraph.cpp +++ b/tests/testNonlinearFactorGraph.cpp @@ -33,8 +33,8 @@ using namespace boost::assign; #include #include #include -#include -#include +#include +#include using namespace gtsam; using namespace example; diff --git a/tests/testNonlinearOptimizer.cpp b/tests/testNonlinearOptimizer.cpp index 6c7fdc3ab..ccc1748dc 100644 --- a/tests/testNonlinearOptimizer.cpp +++ b/tests/testNonlinearOptimizer.cpp @@ -36,9 +36,9 @@ using namespace boost; #include // template definitions -#include -#include -#include +#include +#include +#include using namespace gtsam; diff --git a/tests/testPose2SLAMwSPCG.cpp b/tests/testPose2SLAMwSPCG.cpp index cd9317466..1b3d9f455 100644 --- a/tests/testPose2SLAMwSPCG.cpp +++ b/tests/testPose2SLAMwSPCG.cpp @@ -6,7 +6,7 @@ #include #include -#include +#include using namespace std; using namespace gtsam; diff --git a/tests/testRot3QOptimization.cpp b/tests/testRot3QOptimization.cpp index d46c30ea4..5995c5a98 100644 --- a/tests/testRot3QOptimization.cpp +++ b/tests/testRot3QOptimization.cpp @@ -22,9 +22,9 @@ #include #include #include -#include +#include #include -#include +#include #include #include