release/4.3a0
Frank Dellaert 2012-06-07 02:16:58 +00:00
parent 81b577eb59
commit 78bbcde7cd
2 changed files with 4 additions and 8 deletions

View File

@ -41,13 +41,9 @@ void Ordering::permuteWithInverse(const Permutation& inversePermutation) {
/* ************************************************************************* */ /* ************************************************************************* */
void Ordering::print(const string& str, const KeyFormatter& keyFormatter) const { void Ordering::print(const string& str, const KeyFormatter& keyFormatter) const {
cout << str << " "; cout << str;
BOOST_FOREACH(const Ordering::value_type& key_order, *this) { BOOST_FOREACH(const Ordering::value_type& key_order, *this)
if(key_order != *begin()) cout << keyFormatter(key_order.first) << ":" << key_order.second << endl;
cout << ", ";
cout << keyFormatter(key_order.first) << ":" << key_order.second;
}
cout << endl;
} }
/* ************************************************************************* */ /* ************************************************************************* */

View File

@ -217,7 +217,7 @@ public:
/// @{ /// @{
/** print (from Testable) for testing and debugging */ /** print (from Testable) for testing and debugging */
void print(const std::string& str = "Ordering:", const KeyFormatter& keyFormatter = DefaultKeyFormatter) const; void print(const std::string& str = "Ordering:\n", const KeyFormatter& keyFormatter = DefaultKeyFormatter) const;
/** equals (from Testable) for testing and debugging */ /** equals (from Testable) for testing and debugging */
bool equals(const Ordering& rhs, double tol = 0.0) const; bool equals(const Ordering& rhs, double tol = 0.0) const;