nicer formatting when printing values
parent
61b1a9e88d
commit
b8f9ab1d87
|
@ -84,7 +84,7 @@ public:
|
|||
|
||||
/// Virtual print function, uses traits
|
||||
virtual void print(const std::string& str) const {
|
||||
std::cout << "(" << demangle(typeid(T).name()) << ") ";
|
||||
std::cout << "(" << demangle(typeid(T).name()) << ") " << std::endl;
|
||||
traits<T>::Print(value_, str);
|
||||
}
|
||||
|
||||
|
|
|
@ -69,7 +69,8 @@ namespace gtsam {
|
|||
|
||||
/* ************************************************************************* */
|
||||
void Values::print(const string& str, const KeyFormatter& keyFormatter) const {
|
||||
cout << str << "Values with " << size() << " values:" << endl;
|
||||
cout << str << endl;
|
||||
cout << "Values with " << size() << " values:" << endl;
|
||||
for(const_iterator key_value = begin(); key_value != end(); ++key_value) {
|
||||
cout << "Value " << keyFormatter(key_value->key) << ": ";
|
||||
key_value->value.print("");
|
||||
|
|
Loading…
Reference in New Issue