Added automatic conversion operator from LieScalar to double (simplifies syntax so that .value() is not needed)

release/4.3a0
Richard Roberts 2012-08-11 02:53:54 +00:00
parent b6e7709052
commit 01257d0289
1 changed files with 3 additions and 0 deletions

View File

@ -36,6 +36,9 @@ namespace gtsam {
/** access the underlying value */
double value() const { return d_; }
/** Automatic conversion to underlying value */
operator double() const { return d_; }
/** print @param name optional string naming the object */
inline void print(const std::string& name="") const {
std::cout << name << ": " << d_ << std::endl;