MOre bloat reduction and header ordering.
parent
952cd48d4a
commit
d8468567b2
|
|
@ -19,14 +19,14 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <gtsam/base/FastDefaultAllocator.h>
|
#include <gtsam/base/FastDefaultAllocator.h>
|
||||||
#include <set>
|
|
||||||
#include <iostream>
|
|
||||||
#include <string>
|
|
||||||
#include <cmath>
|
|
||||||
#include <boost/mpl/has_xxx.hpp>
|
#include <boost/mpl/has_xxx.hpp>
|
||||||
#include <boost/utility/enable_if.hpp>
|
#include <boost/utility/enable_if.hpp>
|
||||||
#include <boost/serialization/nvp.hpp>
|
#include <boost/serialization/nvp.hpp>
|
||||||
#include <boost/serialization/set.hpp>
|
#include <boost/serialization/set.hpp>
|
||||||
|
#include <set>
|
||||||
|
#include <iostream>
|
||||||
|
#include <string>
|
||||||
|
#include <cmath>
|
||||||
|
|
||||||
BOOST_MPL_HAS_XXX_TRAIT_DEF(print)
|
BOOST_MPL_HAS_XXX_TRAIT_DEF(print)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,8 @@
|
||||||
#include <gtsam/base/timing.h>
|
#include <gtsam/base/timing.h>
|
||||||
#include <gtsam/base/Vector.h>
|
#include <gtsam/base/Vector.h>
|
||||||
#include <gtsam/base/FastList.h>
|
#include <gtsam/base/FastList.h>
|
||||||
|
#include <gtsam/3rdparty/Eigen/Eigen/SVD>
|
||||||
|
#include <gtsam/3rdparty/Eigen/Eigen/LU>
|
||||||
|
|
||||||
#include <boost/foreach.hpp>
|
#include <boost/foreach.hpp>
|
||||||
#include <boost/tuple/tuple.hpp>
|
#include <boost/tuple/tuple.hpp>
|
||||||
|
|
@ -32,9 +34,6 @@
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <limits>
|
#include <limits>
|
||||||
|
|
||||||
#include <gtsam/3rdparty/Eigen/Eigen/SVD>
|
|
||||||
#include <gtsam/3rdparty/Eigen/Eigen/LU>
|
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
namespace gtsam {
|
namespace gtsam {
|
||||||
|
|
@ -183,6 +182,7 @@ void transposeMultiplyAdd(double alpha, const Matrix& A, const Vector& e, SubVec
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ************************************************************************* */
|
/* ************************************************************************* */
|
||||||
|
//3 argument call
|
||||||
void print(const Matrix& A, const string &s, ostream& stream) {
|
void print(const Matrix& A, const string &s, ostream& stream) {
|
||||||
size_t m = A.rows(), n = A.cols();
|
size_t m = A.rows(), n = A.cols();
|
||||||
|
|
||||||
|
|
@ -201,6 +201,12 @@ void print(const Matrix& A, const string &s, ostream& stream) {
|
||||||
stream << "];" << endl;
|
stream << "];" << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ************************************************************************* */
|
||||||
|
//1 or 2 argument call
|
||||||
|
void print(const Matrix& A, const string &s){
|
||||||
|
print(A, s, cout);
|
||||||
|
}
|
||||||
|
|
||||||
/* ************************************************************************* */
|
/* ************************************************************************* */
|
||||||
void save(const Matrix& A, const string &s, const string& filename) {
|
void save(const Matrix& A, const string &s, const string& filename) {
|
||||||
fstream stream(filename.c_str(), fstream::out | fstream::app);
|
fstream stream(filename.c_str(), fstream::out | fstream::app);
|
||||||
|
|
|
||||||
|
|
@ -22,12 +22,12 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
#include <gtsam/base/Vector.h>
|
#include <gtsam/base/Vector.h>
|
||||||
#include <boost/format.hpp>
|
|
||||||
#include <boost/tuple/tuple.hpp>
|
|
||||||
#include <boost/math/special_functions/fpclassify.hpp>
|
#include <boost/math/special_functions/fpclassify.hpp>
|
||||||
#include <gtsam/3rdparty/Eigen/Eigen/Core>
|
#include <gtsam/3rdparty/Eigen/Eigen/Core>
|
||||||
#include <gtsam/3rdparty/Eigen/Eigen/Cholesky>
|
#include <gtsam/3rdparty/Eigen/Eigen/Cholesky>
|
||||||
#include <gtsam/3rdparty/Eigen/Eigen/LU>
|
#include <gtsam/3rdparty/Eigen/Eigen/LU>
|
||||||
|
#include <boost/format.hpp>
|
||||||
|
#include <boost/tuple/tuple.hpp>
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -201,9 +201,14 @@ inline MATRIX prod(const MATRIX& A, const MATRIX&B) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* print a matrix
|
* print without optional string, must specify cout yourself
|
||||||
*/
|
*/
|
||||||
GTSAM_EXPORT void print(const Matrix& A, const std::string& s = "", std::ostream& stream = std::cout);
|
GTSAM_EXPORT void print(const Matrix& A, const std::string& s, std::ostream& stream);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* print with optional string to cout
|
||||||
|
*/
|
||||||
|
GTSAM_EXPORT void print(const Matrix& A, const std::string& s = "");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* save a matrix to file, which can be loaded by matlab
|
* save a matrix to file, which can be loaded by matlab
|
||||||
|
|
|
||||||
|
|
@ -18,9 +18,10 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <memory>
|
|
||||||
#include <boost/serialization/assume_abstract.hpp>
|
|
||||||
#include <gtsam/base/Vector.h>
|
#include <gtsam/base/Vector.h>
|
||||||
|
#include <boost/serialization/assume_abstract.hpp>
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
|
|
||||||
namespace gtsam {
|
namespace gtsam {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,20 +16,18 @@
|
||||||
* @author Frank Dellaert
|
* @author Frank Dellaert
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <gtsam/base/Vector.h>
|
||||||
|
#include <boost/foreach.hpp>
|
||||||
|
#include <boost/optional.hpp>
|
||||||
|
#include <stdexcept>
|
||||||
#include <cstdarg>
|
#include <cstdarg>
|
||||||
#include <limits>
|
#include <limits>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <stdexcept>
|
|
||||||
#include <boost/foreach.hpp>
|
|
||||||
#include <boost/optional.hpp>
|
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <gtsam/base/Vector.h>
|
|
||||||
|
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
|
|
@ -55,6 +53,7 @@ Vector delta(size_t n, size_t i, double value) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ************************************************************************* */
|
/* ************************************************************************* */
|
||||||
|
//3 argument call
|
||||||
void print(const Vector& v, const string& s, ostream& stream) {
|
void print(const Vector& v, const string& s, ostream& stream) {
|
||||||
size_t n = v.size();
|
size_t n = v.size();
|
||||||
|
|
||||||
|
|
@ -65,6 +64,12 @@ void print(const Vector& v, const string& s, ostream& stream) {
|
||||||
stream << "];" << endl;
|
stream << "];" << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ************************************************************************* */
|
||||||
|
//1 or 2 argument call
|
||||||
|
void print(const Vector& v, const string& s) {
|
||||||
|
print(v, s, cout);
|
||||||
|
}
|
||||||
|
|
||||||
/* ************************************************************************* */
|
/* ************************************************************************* */
|
||||||
void save(const Vector& v, const string &s, const string& filename) {
|
void save(const Vector& v, const string &s, const string& filename) {
|
||||||
fstream stream(filename.c_str(), fstream::out | fstream::app);
|
fstream stream(filename.c_str(), fstream::out | fstream::app);
|
||||||
|
|
|
||||||
|
|
@ -20,10 +20,11 @@
|
||||||
|
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
#include <list>
|
|
||||||
#include <gtsam/global_includes.h>
|
#include <gtsam/global_includes.h>
|
||||||
#include <gtsam/3rdparty/Eigen/Eigen/Core>
|
#include <gtsam/3rdparty/Eigen/Eigen/Core>
|
||||||
#include <iostream>
|
#include <iosfwd>
|
||||||
|
#include <list>
|
||||||
|
|
||||||
namespace gtsam {
|
namespace gtsam {
|
||||||
|
|
||||||
// Vector is just a typedef of the Eigen dynamic vector type
|
// Vector is just a typedef of the Eigen dynamic vector type
|
||||||
|
|
@ -95,9 +96,14 @@ GTSAM_EXPORT bool zero(const Vector& v);
|
||||||
inline size_t dim(const Vector& v) { return v.size(); }
|
inline size_t dim(const Vector& v) { return v.size(); }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* print with optional string
|
* print without optional string, must specify cout yourself
|
||||||
*/
|
*/
|
||||||
GTSAM_EXPORT void print(const Vector& v, const std::string& s = "", std::ostream& stream = std::cout);
|
GTSAM_EXPORT void print(const Vector& v, const std::string& s, std::ostream& stream);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* print with optional string to cout
|
||||||
|
*/
|
||||||
|
GTSAM_EXPORT void print(const Vector& v, const std::string& s = "");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* save a vector to file, which can be loaded by matlab
|
* save a vector to file, which can be loaded by matlab
|
||||||
|
|
|
||||||
|
|
@ -17,9 +17,9 @@
|
||||||
* @addtogroup base
|
* @addtogroup base
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <boost/lexical_cast.hpp>
|
|
||||||
#include <gtsam/base/types.h>
|
#include <gtsam/base/types.h>
|
||||||
#include <gtsam/inference/Symbol.h>
|
#include <gtsam/inference/Symbol.h>
|
||||||
|
#include <boost/lexical_cast.hpp>
|
||||||
|
|
||||||
namespace gtsam {
|
namespace gtsam {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -21,12 +21,12 @@
|
||||||
|
|
||||||
#include <gtsam/dllexport.h>
|
#include <gtsam/dllexport.h>
|
||||||
#include <gtsam/config.h>
|
#include <gtsam/config.h>
|
||||||
#include <cstddef>
|
|
||||||
#include <string>
|
|
||||||
#include <ostream>
|
|
||||||
#include <boost/function/function1.hpp>
|
#include <boost/function/function1.hpp>
|
||||||
#include <boost/range/concepts.hpp>
|
#include <boost/range/concepts.hpp>
|
||||||
#include <boost/optional.hpp>
|
#include <boost/optional.hpp>
|
||||||
|
#include <cstddef>
|
||||||
|
#include <string>
|
||||||
|
#include <ostream>
|
||||||
|
|
||||||
#ifdef GTSAM_USE_TBB
|
#ifdef GTSAM_USE_TBB
|
||||||
#include <tbb/task_scheduler_init.h>
|
#include <tbb/task_scheduler_init.h>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue