[mlpack-svn] r14048 - mlpack/trunk/src/mlpack/core/tree

fastlab-svn at coffeetalk-1.cc.gatech.edu fastlab-svn at coffeetalk-1.cc.gatech.edu
Fri Dec 21 15:51:31 EST 2012


Author: rcurtin
Date: 2012-12-21 15:51:30 -0500 (Fri, 21 Dec 2012)
New Revision: 14048

Modified:
   mlpack/trunk/src/mlpack/core/tree/hrectbound_impl.hpp
Log:
Fix unsafe code in HRectBound; bounds can be NULL.


Modified: mlpack/trunk/src/mlpack/core/tree/hrectbound_impl.hpp
===================================================================
--- mlpack/trunk/src/mlpack/core/tree/hrectbound_impl.hpp	2012-12-21 20:31:59 UTC (rev 14047)
+++ mlpack/trunk/src/mlpack/core/tree/hrectbound_impl.hpp	2012-12-21 20:51:30 UTC (rev 14048)
@@ -393,7 +393,10 @@
   std::ostringstream convert;
   convert << "HRectBound [" << this << "]" << std::endl;
   convert << "dim: " << dim << std::endl;
-  convert << "bounds: " << bounds->ToString() << std::endl;
+  convert << "bounds: " << std::endl;
+  for (size_t i = 0; i < dim; ++i)
+    convert << util::Indent(bounds[i].ToString()) << std::endl;
+
   return convert.str();
 }
 




More information about the mlpack-svn mailing list