[mlpack-git] master: binary_space_tree.hpp #787 fix (4e816b6)

gitdub at mlpack.org gitdub at mlpack.org
Mon Sep 19 05:50:23 EDT 2016


Repository : https://github.com/mlpack/mlpack
On branch  : master
Link       : https://github.com/mlpack/mlpack/compare/045c16afa6fff8520722bbf19d98312e0eb24532...635238ba763335f6708b5560ae6606b008fdd609

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

commit 4e816b639977f444ec3ff8c294d3334dd274e795
Author: Anuraj Kanodia <akanuraj200 at gmail.com>
Date:   Mon Sep 19 15:20:23 2016 +0530

    binary_space_tree.hpp #787 fix
    
    Replaced MinDistance(TreeType*) with MinDistance(TreeType&) and refactored


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

4e816b639977f444ec3ff8c294d3334dd274e795
 src/mlpack/core/tree/binary_space_tree/binary_space_tree.hpp | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/mlpack/core/tree/binary_space_tree/binary_space_tree.hpp b/src/mlpack/core/tree/binary_space_tree/binary_space_tree.hpp
index 6d60080..4a77376 100644
--- a/src/mlpack/core/tree/binary_space_tree/binary_space_tree.hpp
+++ b/src/mlpack/core/tree/binary_space_tree/binary_space_tree.hpp
@@ -428,21 +428,21 @@ class BinarySpaceTree
   size_t Point(const size_t index) const;
 
   //! Return the minimum distance to another node.
-  ElemType MinDistance(const BinarySpaceTree* other) const
+  ElemType MinDistance(const BinarySpaceTree& other) const
   {
-    return bound.MinDistance(other->Bound());
+    return bound.MinDistance(other.Bound());
   }
 
   //! Return the maximum distance to another node.
-  ElemType MaxDistance(const BinarySpaceTree* other) const
+  ElemType MaxDistance(const BinarySpaceTree& other) const
   {
-    return bound.MaxDistance(other->Bound());
+    return bound.MaxDistance(other.Bound());
   }
 
   //! Return the minimum and maximum distance to another node.
-  math::RangeType<ElemType> RangeDistance(const BinarySpaceTree* other) const
+  math::RangeType<ElemType> RangeDistance(const BinarySpaceTree& other) const
   {
-    return bound.RangeDistance(other->Bound());
+    return bound.RangeDistance(other.Bound());
   }
 
   //! Return the minimum distance to another point.




More information about the mlpack-git mailing list