Removed using namespace in header files
parent
dd79bacfab
commit
d188ed2e1a
|
@ -41,7 +41,7 @@ struct VisualSLAMExampleData {
|
|||
std::vector<gtsam::Pose3> poses; // ground-truth camera poses
|
||||
gtsam::Pose3 odometry; // ground-truth odometry between 2 consecutive poses (simulated data for iSAM)
|
||||
std::vector<gtsam::Point3> points; // ground-truth landmarks
|
||||
std::map<int, vector<gtsam::Point2> > z; // 2D measurements of landmarks in each camera frame
|
||||
std::map<int, std::vector<gtsam::Point2> > z; // 2D measurements of landmarks in each camera frame
|
||||
gtsam::SharedDiagonal noiseZ; // measurement noise (noiseModel::Isotropic::Sigma(2, 5.0f));
|
||||
gtsam::SharedDiagonal noiseX; // noise for camera poses
|
||||
gtsam::SharedDiagonal noiseL; // noise for landmarks
|
||||
|
|
|
@ -61,8 +61,8 @@ namespace gtsam {
|
|||
if (separator != other.separator) return false;
|
||||
if (children_.size() != other.children_.size()) return false;
|
||||
|
||||
typename list<shared_ptr>::const_iterator it1 = children_.begin();
|
||||
typename list<shared_ptr>::const_iterator it2 = other.children_.begin();
|
||||
typename std::list<shared_ptr>::const_iterator it1 = children_.begin();
|
||||
typename std::list<shared_ptr>::const_iterator it2 = other.children_.begin();
|
||||
for (; it1 != children_.end(); it1++, it2++)
|
||||
if (!(*it1)->equals(**it2)) return false;
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ public:
|
|||
|
||||
/* ************************************************************************* */
|
||||
template<class KEY>
|
||||
list<KEY> predecessorMap2Keys(const PredecessorMap<KEY>& p_map) {
|
||||
std::list<KEY> predecessorMap2Keys(const PredecessorMap<KEY>& p_map) {
|
||||
|
||||
typedef typename SGraph<KEY>::Vertex SVertex;
|
||||
|
||||
|
@ -102,7 +102,7 @@ SDGraph<KEY> toBoostGraph(const G& graph) {
|
|||
|
||||
/* ************************************************************************* */
|
||||
template<class G, class V, class KEY>
|
||||
boost::tuple<G, V, map<KEY,V> >
|
||||
boost::tuple<G, V, std::map<KEY,V> >
|
||||
predecessorMap2Graph(const PredecessorMap<KEY>& p_map) {
|
||||
|
||||
G g;
|
||||
|
|
|
@ -30,6 +30,7 @@ using namespace boost::assign;
|
|||
#include <gtsam/inference/IndexFactor.h>
|
||||
#include <gtsam/inference/SymbolicSequentialSolver.h>
|
||||
|
||||
using namespace std;
|
||||
using namespace gtsam;
|
||||
|
||||
typedef BayesTree<IndexConditional> SymbolicBayesTree;
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#include <gtsam/inference/VariableIndex.h>
|
||||
#include <gtsam/inference/SymbolicFactorGraph.h>
|
||||
|
||||
using namespace std;
|
||||
using namespace gtsam;
|
||||
|
||||
/* ************************************************************************* */
|
||||
|
|
|
@ -97,13 +97,13 @@ VectorValues::shared_ptr SimpleSPCGSolver::optimize (const VectorValues &initial
|
|||
double gamma = s.vector().squaredNorm(), new_gamma = 0.0, alpha = 0.0, beta = 0.0 ;
|
||||
|
||||
const double threshold =
|
||||
::max(parameters_.epsilon_abs(),
|
||||
std::max(parameters_.epsilon_abs(),
|
||||
parameters_.epsilon() * parameters_.epsilon() * gamma);
|
||||
const size_t iMaxIterations = parameters_.maxIterations();
|
||||
const ConjugateGradientParameters::Verbosity verbosity = parameters_.cg_.verbosity();
|
||||
|
||||
if ( verbosity >= ConjugateGradientParameters::ERROR )
|
||||
cout << "[SimpleSPCGSolver] epsilon = " << parameters_.epsilon()
|
||||
std::cout << "[SimpleSPCGSolver] epsilon = " << parameters_.epsilon()
|
||||
<< ", max = " << parameters_.maxIterations()
|
||||
<< ", ||r0|| = " << std::sqrt(gamma)
|
||||
<< ", threshold = " << threshold << std::endl;
|
||||
|
@ -122,14 +122,14 @@ VectorValues::shared_ptr SimpleSPCGSolver::optimize (const VectorValues &initial
|
|||
gamma = new_gamma ;
|
||||
|
||||
if ( verbosity >= ConjugateGradientParameters::ERROR) {
|
||||
cout << "[SimpleSPCGSolver] iteration " << k << ": a = " << alpha << ": b = " << beta << ", ||r|| = " << std::sqrt(gamma) << endl;
|
||||
std::cout << "[SimpleSPCGSolver] iteration " << k << ": a = " << alpha << ": b = " << beta << ", ||r|| = " << std::sqrt(gamma) << std::endl;
|
||||
}
|
||||
|
||||
if ( gamma < threshold ) break ;
|
||||
} // k
|
||||
|
||||
if ( verbosity >= ConjugateGradientParameters::ERROR )
|
||||
cout << "[SimpleSPCGSolver] iteration " << k << ": a = " << alpha << ": b = " << beta << ", ||r|| = " << std::sqrt(gamma) << endl;
|
||||
std::cout << "[SimpleSPCGSolver] iteration " << k << ": a = " << alpha << ": b = " << beta << ", ||r|| = " << std::sqrt(gamma) << std::endl;
|
||||
|
||||
/* transform y back to x */
|
||||
return this->transform(*x);
|
||||
|
|
|
@ -18,6 +18,8 @@
|
|||
#include <cmath>
|
||||
#include <gtsam/nonlinear/DoglegOptimizerImpl.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
namespace gtsam {
|
||||
/* ************************************************************************* */
|
||||
VectorValues DoglegOptimizerImpl::ComputeDoglegPoint(
|
||||
|
|
|
@ -21,6 +21,8 @@
|
|||
#include <gtsam/linear/GaussianMultifrontalSolver.h>
|
||||
#include <gtsam/nonlinear/Marginals.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
namespace gtsam {
|
||||
|
||||
/* ************************************************************************* */
|
||||
|
|
|
@ -11,6 +11,8 @@
|
|||
#include <gtsam/base/Testable.h>
|
||||
#include <boost/foreach.hpp>
|
||||
|
||||
using namespace std;
|
||||
|
||||
namespace gtsam {
|
||||
|
||||
/// Find the best total assignment - can be expensive
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
|
||||
#include <gtsam_unstable/discrete/CSP.h>
|
||||
#include <gtsam_unstable/discrete/Domain.h>
|
||||
#include <boost/assign/std/map.hpp>
|
||||
using boost::assign::insert;
|
||||
#include <CppUnitLite/TestHarness.h>
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
|
||||
#include <gtsam_unstable/discrete/CSP.h>
|
||||
#include <CppUnitLite/TestHarness.h>
|
||||
#include <boost/assign/std/map.hpp>
|
||||
using boost::assign::insert;
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <stdarg.h>
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
#include <gtsam_unstable/dynamics/imuSystem.h>
|
||||
|
||||
using namespace std;
|
||||
using namespace gtsam;
|
||||
using namespace imu;
|
||||
|
||||
|
|
Loading…
Reference in New Issue