Fixed printing

release/4.3a0
dellaert 2014-12-12 13:56:50 +01:00
parent c1f464625b
commit 3238c59a39
2 changed files with 5 additions and 3 deletions

View File

@ -251,8 +251,10 @@ public:
/// Streaming
GTSAM_EXPORT friend std::ostream &operator<<(std::ostream &os,
const ExpressionNode& node) {
os << "Expression of type " << typeid(int).name() << std::endl;
if (node.traceSize_>0) os << node.traceSize_ << std::endl;
os << "Expression of type " << typeid(T).name();
if (node.traceSize_>0) os << ", trace size = " << node.traceSize_;
os << "\n";
return os;
}
/// Return keys that play in this expression as a set

View File

@ -54,7 +54,7 @@ public:
/// Print
void print(const std::string& s) const {
std::cout << s << root_ << std::endl;
std::cout << s << *root_ << std::endl;
}
// Construct a constant expression