diff --git a/gtsam/inference/BayesNet-inl.h b/gtsam/inference/BayesNet-inl.h index 7ff8fc076..53e0ec18d 100644 --- a/gtsam/inference/BayesNet-inl.h +++ b/gtsam/inference/BayesNet-inl.h @@ -37,7 +37,7 @@ namespace gtsam { /* ************************************************************************* */ template void BayesNet::print(const string& s) const { - cout << s << ":\n"; + cout << s; BOOST_REVERSE_FOREACH(sharedConditional conditional,conditionals_) conditional->print(); } diff --git a/gtsam/nonlinear/Symbol.h b/gtsam/nonlinear/Symbol.h index f671a4b30..03fd4aa1f 100644 --- a/gtsam/nonlinear/Symbol.h +++ b/gtsam/nonlinear/Symbol.h @@ -18,8 +18,8 @@ #pragma once -#include -#include +#include + #include #include #include @@ -28,7 +28,8 @@ #include #include -#include +#include +#include namespace gtsam { @@ -70,8 +71,8 @@ public: j_ = key & indexMask; } - /** Cast to integer */ - operator Key() const { + /** return Key (integer) representation */ + Key key() const { const size_t keyBits = sizeof(Key) * 8; const size_t chrBits = sizeof(unsigned char) * 8; const size_t indexBits = keyBits - chrBits; @@ -83,9 +84,12 @@ public: return key; } + /** Cast to integer */ + operator Key() const { return key(); } + // Testable Requirements void print(const std::string& s = "") const { - std::cout << s << ": " << (std::string) (*this) << std::endl; + std::cout << s << (std::string) (*this) << std::endl; } bool equals(const Symbol& expected, double tol = 0.0) const { return (*this) == expected; diff --git a/gtsam/nonlinear/Values.h b/gtsam/nonlinear/Values.h index 4af8e5a3e..4a03ab05e 100644 --- a/gtsam/nonlinear/Values.h +++ b/gtsam/nonlinear/Values.h @@ -24,8 +24,10 @@ #pragma once -#include -#include +#include +#include +#include +#include #include #include @@ -37,10 +39,8 @@ #include #include -#include -#include -#include -#include +#include +#include namespace gtsam {