diff --git a/examples/Pose2SLAMExample_lago.cpp b/examples/Pose2SLAMExample_lago.cpp index c84ea8c7c..75072d7da 100644 --- a/examples/Pose2SLAMExample_lago.cpp +++ b/examples/Pose2SLAMExample_lago.cpp @@ -48,7 +48,7 @@ int main(const int argc, const char *argv[]) { graphWithPrior.print(); std::cout << "Computing LAGO estimate" << std::endl; - Values estimateLago = initializeLago(graphWithPrior); + Values estimateLago = lago::initializeLago(graphWithPrior); std::cout << "done!" << std::endl; if (argc < 3) { diff --git a/gtsam/nonlinear/lago.cpp b/gtsam/nonlinear/lago.cpp index 08fa8175f..28de71b8b 100644 --- a/gtsam/nonlinear/lago.cpp +++ b/gtsam/nonlinear/lago.cpp @@ -24,6 +24,7 @@ #include namespace gtsam { +namespace lago { static Matrix I = eye(1); static Matrix I3 = eye(3); @@ -347,4 +348,5 @@ Values initializeLago(const NonlinearFactorGraph& graph, const Values& initialGu return initialGuessLago; } +} // end of namespace lago } // end of namespace gtsam diff --git a/gtsam/nonlinear/lago.h b/gtsam/nonlinear/lago.h index 4450e1108..85d9863b1 100644 --- a/gtsam/nonlinear/lago.h +++ b/gtsam/nonlinear/lago.h @@ -41,6 +41,7 @@ #include namespace gtsam { +namespace lago { typedef std::map key2doubleMap; const Key keyAnchor = symbol('Z',9999999); @@ -93,4 +94,5 @@ GTSAM_EXPORT Values initializeLago(const NonlinearFactorGraph& graph, bool useOd /* Only corrects the orientation part in initialGuess */ GTSAM_EXPORT Values initializeLago(const NonlinearFactorGraph& graph, const Values& initialGuess); +} // end of namespace lago } // end of namespace gtsam diff --git a/gtsam/nonlinear/tests/testLago.cpp b/gtsam/nonlinear/tests/testLago.cpp index 576266f22..29dbcc720 100644 --- a/gtsam/nonlinear/tests/testLago.cpp +++ b/gtsam/nonlinear/tests/testLago.cpp @@ -37,6 +37,7 @@ using namespace std; using namespace gtsam; +using namespace lago; using namespace boost::assign; Symbol x0('x', 0), x1('x', 1), x2('x', 2), x3('x', 3);