Added a print function for RangeFactor

release/4.3a0
Alex Cunningham 2011-03-31 03:14:21 +00:00
parent ce70480ae0
commit 53bb7584b6
1 changed files with 6 additions and 2 deletions

View File

@ -16,8 +16,7 @@
#pragma once
//#include <gtsam/geometry/Pose2.h>
//#include <gtsam/geometry/Point2.h>
#include <boost/lexical_cast.hpp>
#include <gtsam/nonlinear/NonlinearFactor.h>
namespace gtsam {
@ -63,6 +62,11 @@ namespace gtsam {
return e != NULL && Base::equals(*e, tol) && fabs(this->z_ - e->z_) < tol;
}
/** print contents */
void print(const std::string& s="") const {
Base::print(s + std::string(" range: ") + boost::lexical_cast<std::string>(z_));
}
private:
/** Serialization function */