[mlpack-git] master: Refactor for changes in #788. (63c5d09)

gitdub at mlpack.org gitdub at mlpack.org
Mon Sep 26 11:03:12 EDT 2016


Repository : https://github.com/mlpack/mlpack
On branch  : master
Link       : https://github.com/mlpack/mlpack/compare/9ef7339d40550a974b3939e9fcb966fac2c09065...ebdb5abeaa3fd621a06ae663862bb72df76d2b40

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

commit 63c5d09ae29a3f1b9dc18df8cca0f3fc64ad21bf
Author: Ryan Curtin <ryan at ratml.org>
Date:   Mon Sep 26 11:03:12 2016 -0400

    Refactor for changes in #788.


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

63c5d09ae29a3f1b9dc18df8cca0f3fc64ad21bf
 src/mlpack/core/tree/octree/octree.hpp      |  6 +++---
 src/mlpack/core/tree/octree/octree_impl.hpp | 12 ++++++------
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/mlpack/core/tree/octree/octree.hpp b/src/mlpack/core/tree/octree/octree.hpp
index 0a8ffd2..5cdecfc 100644
--- a/src/mlpack/core/tree/octree/octree.hpp
+++ b/src/mlpack/core/tree/octree/octree.hpp
@@ -352,11 +352,11 @@ class Octree
   size_t Point(const size_t index) const;
 
   //! Return the minimum distance to another node.
-  ElemType MinDistance(const Octree* other) const;
+  ElemType MinDistance(const Octree& other) const;
   //! Return the maximum distance to another node.
-  ElemType MaxDistance(const Octree* other) const;
+  ElemType MaxDistance(const Octree& other) const;
   //! Return the minimum and maximum distance to another node.
-  math::RangeType<ElemType> RangeDistance(const Octree* other) const;
+  math::RangeType<ElemType> RangeDistance(const Octree& other) const;
 
   //! Return the minimum distance to the given point.
   template<typename VecType>
diff --git a/src/mlpack/core/tree/octree/octree_impl.hpp b/src/mlpack/core/tree/octree/octree_impl.hpp
index 987d139..a366bf8 100644
--- a/src/mlpack/core/tree/octree/octree_impl.hpp
+++ b/src/mlpack/core/tree/octree/octree_impl.hpp
@@ -566,26 +566,26 @@ size_t Octree<MetricType, StatisticType, MatType>::Point(const size_t index)
 
 template<typename MetricType, typename StatisticType, typename MatType>
 typename Octree<MetricType, StatisticType, MatType>::ElemType
-Octree<MetricType, StatisticType, MatType>::MinDistance(const Octree* other)
+Octree<MetricType, StatisticType, MatType>::MinDistance(const Octree& other)
     const
 {
-  return bound.MinDistance(other->Bound());
+  return bound.MinDistance(other.Bound());
 }
 
 template<typename MetricType, typename StatisticType, typename MatType>
 typename Octree<MetricType, StatisticType, MatType>::ElemType
-Octree<MetricType, StatisticType, MatType>::MaxDistance(const Octree* other)
+Octree<MetricType, StatisticType, MatType>::MaxDistance(const Octree& other)
     const
 {
-  return bound.MaxDistance(other->Bound());
+  return bound.MaxDistance(other.Bound());
 }
 
 template<typename MetricType, typename StatisticType, typename MatType>
 math::RangeType<typename Octree<MetricType, StatisticType, MatType>::ElemType>
-Octree<MetricType, StatisticType, MatType>::RangeDistance(const Octree* other)
+Octree<MetricType, StatisticType, MatType>::RangeDistance(const Octree& other)
     const
 {
-  return bound.RangeDistance(other->Bound());
+  return bound.RangeDistance(other.Bound());
 }
 
 template<typename MetricType, typename StatisticType, typename MatType>




More information about the mlpack-git mailing list