[mlpack] 173/324: Use slightly safer Width().

Barak A. Pearlmutter barak+git at cs.nuim.ie
Sun Aug 17 08:22:07 UTC 2014


This is an automated email from the git hooks/post-receive script.

bap pushed a commit to branch svn-trunk
in repository mlpack.

commit cf125175e7b89c6ed6c2b703bc7509f812a55d46
Author: rcurtin <rcurtin at 9d5b8971-822b-0410-80eb-d18c1038ef23>
Date:   Thu Jul 10 14:46:08 2014 +0000

    Use slightly safer Width().
    
    
    git-svn-id: http://svn.cc.gatech.edu/fastlab/mlpack/trunk@16812 9d5b8971-822b-0410-80eb-d18c1038ef23
---
 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;
   }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/mlpack.git



More information about the debian-science-commits mailing list