add print

release/4.3a0
Kai Ni 2010-01-23 04:46:00 +00:00
parent b092fee64b
commit 744269343f
3 changed files with 17 additions and 0 deletions

View File

@ -33,6 +33,17 @@ namespace gtsam {
// initialize non-linear solver // initialize non-linear solver
solver_.initialize(*graph_, *theta_); solver_.initialize(*graph_, *theta_);
linearize();
}
/* ************************************************************************* */
void Pose2SLAMOptimizer::print(const string& str) const {
GTSAM_PRINT(*graph_);
GTSAM_PRINT(*theta_);
//TODO
//GTSAM_PRINT(solver_);
GTSAM_PRINT(*system_);
} }
/* ************************************************************************* */ /* ************************************************************************* */

View File

@ -44,6 +44,11 @@ namespace gtsam {
Pose2SLAMOptimizer(const std::string& dataset = "", Pose2SLAMOptimizer(const std::string& dataset = "",
const std::string& path = ""); const std::string& path = "");
/**
* print the object
*/
void print(const std::string& str = "") const;
/** /**
* Virtual destructor * Virtual destructor
*/ */

View File

@ -1,5 +1,6 @@
class Pose2SLAMOptimizer { class Pose2SLAMOptimizer {
Pose2SLAMOptimizer(string dataset_name); Pose2SLAMOptimizer(string dataset_name);
void print(string s) const;
void update(Vector x) const; void update(Vector x) const;
Vector optimize() const; Vector optimize() const;
double error() const; double error() const;