[mlpack-svn] r16264 - in mlpack/trunk/src/mlpack/core/tree: . binary_space_tree

fastlab-svn at coffeetalk-1.cc.gatech.edu fastlab-svn at coffeetalk-1.cc.gatech.edu
Mon Feb 10 09:59:28 EST 2014


Author: rcurtin
Date: Mon Feb 10 09:59:28 2014
New Revision: 16264

Log:
Minor changes to ToString() output.


Modified:
   mlpack/trunk/src/mlpack/core/tree/ballbound_impl.hpp
   mlpack/trunk/src/mlpack/core/tree/binary_space_tree/binary_space_tree_impl.hpp
   mlpack/trunk/src/mlpack/core/tree/hrectbound_impl.hpp

Modified: mlpack/trunk/src/mlpack/core/tree/ballbound_impl.hpp
==============================================================================
--- mlpack/trunk/src/mlpack/core/tree/ballbound_impl.hpp	(original)
+++ mlpack/trunk/src/mlpack/core/tree/ballbound_impl.hpp	Mon Feb 10 09:59:28 2014
@@ -199,7 +199,7 @@
   std::ostringstream convert;
   convert << "BallBound [" << this << "]" << std::endl;
   convert << "  Radius:  " << radius << std::endl;
-  convert << "  Center:  " << center << std::endl;
+  convert << "  Center:" << std::endl << center;
   return convert.str();
 }
 

Modified: mlpack/trunk/src/mlpack/core/tree/binary_space_tree/binary_space_tree_impl.hpp
==============================================================================
--- mlpack/trunk/src/mlpack/core/tree/binary_space_tree/binary_space_tree_impl.hpp	(original)
+++ mlpack/trunk/src/mlpack/core/tree/binary_space_tree/binary_space_tree_impl.hpp	Mon Feb 10 09:59:28 2014
@@ -710,23 +710,25 @@
 {
   std::ostringstream convert;
   convert << "BinarySpaceTree [" << this << "]" << std::endl;
-  convert << "  begin: " << begin << std::endl;
-  convert << "  count: " << count << std::endl;
-  convert << "  bound: " << std::endl;
-  convert << mlpack::util::Indent(bound.ToString(),2);
-  convert << "  statistic: " << std::endl;
-  convert << mlpack::util::Indent(stat.ToString(),2);
-  convert << "  leaf size: " << leafSize << std::endl;
-  convert << "  splitDimension: " << splitDimension << std::endl;
+  convert << "  First point: " << begin << std::endl;
+  convert << "  Number of descendants: " << count << std::endl;
+  convert << "  Bound: " << std::endl;
+  convert << mlpack::util::Indent(bound.ToString(), 2);
+  convert << "  Statistic: " << std::endl;
+  convert << mlpack::util::Indent(stat.ToString(), 2);
+  convert << "  Leaf size: " << leafSize << std::endl;
+  convert << "  Split dimension: " << splitDimension << std::endl;
+
+  // How many levels should we print?  This will print every level of the tree.
   if (left != NULL)
   {
-    convert << "left:" << std::endl;
-    convert << mlpack::util::Indent(left->ToString());
+    convert << " Left child:" << std::endl;
+    convert << mlpack::util::Indent(left->ToString(), 2);
   }
   if (right != NULL)
   {
-    convert << "right:" << std::endl;
-    convert << mlpack::util::Indent(right->ToString());
+    convert << " Right child:" << std::endl;
+    convert << mlpack::util::Indent(right->ToString(), 2);
   }
   return convert.str();
 }

Modified: mlpack/trunk/src/mlpack/core/tree/hrectbound_impl.hpp
==============================================================================
--- mlpack/trunk/src/mlpack/core/tree/hrectbound_impl.hpp	(original)
+++ mlpack/trunk/src/mlpack/core/tree/hrectbound_impl.hpp	Mon Feb 10 09:59:28 2014
@@ -389,8 +389,10 @@
 {
   std::ostringstream convert;
   convert << "HRectBound [" << this << "]" << std::endl;
-  convert << "dim: " << dim << std::endl;
-  convert << "bounds: " << std::endl;
+  convert << "  Power: " << Power << std::endl;
+  convert << "  TakeRoot: " << (TakeRoot ? "true" : "false") << std::endl;
+  convert << "  Dimensionality: " << dim << std::endl;
+  convert << "  Bounds: " << std::endl;
   for (size_t i = 0; i < dim; ++i)
     convert << util::Indent(bounds[i].ToString()) << std::endl;
 



More information about the mlpack-svn mailing list