[mlpack-git] master, mlpack-1.0.x: Use slightly safer Width(). (88da7fd)

gitdub at big.cc.gt.atl.ga.us gitdub at big.cc.gt.atl.ga.us
Thu Mar 5 21:52:55 EST 2015


Repository : https://github.com/mlpack/mlpack

On branches: master,mlpack-1.0.x
Link       : https://github.com/mlpack/mlpack/compare/904762495c039e345beba14c1142fd719b3bd50e...f94823c800ad6f7266995c700b1b630d5ffdcf40

>---------------------------------------------------------------

commit 88da7fdcb169abcdb418cb4cd8943660a1313f0d
Author: Ryan Curtin <ryan at ratml.org>
Date:   Thu Jul 10 14:46:08 2014 +0000

    Use slightly safer Width().


>---------------------------------------------------------------

88da7fdcb169abcdb418cb4cd8943660a1313f0d
 src/mlpack/core/tree/hrectbound_impl.hpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/mlpack/core/tree/hrectbound_impl.hpp b/src/mlpack/core/tree/hrectbound_impl.hpp
index 862c811..df59317 100644
--- a/src/mlpack/core/tree/hrectbound_impl.hpp
+++ b/src/mlpack/core/tree/hrectbound_impl.hpp
@@ -343,7 +343,7 @@ HRectBound<Power, TakeRoot>& HRectBound<Power, TakeRoot>::operator|=(
   for (size_t i = 0; i < dim; i++)
   {
     bounds[i] |= math::Range(mins[i], maxs[i]);
-    const double width = bounds[i].Hi() - bounds[i].Lo();
+    const double width = bounds[i].Width();
     if (width < minWidth)
       minWidth = width;
   }
@@ -364,7 +364,7 @@ HRectBound<Power, TakeRoot>& HRectBound<Power, TakeRoot>::operator|=(
   for (size_t i = 0; i < dim; i++)
   {
     bounds[i] |= other.bounds[i];
-    const double width = bounds[i].Hi() - bounds[i].Lo();
+    const double width = bounds[i].Width();
     if (width < minWidth)
       minWidth = width;
   }



More information about the mlpack-git mailing list