[mlpack-git] master: Remove unnecessary LastDistanceNode(). (4a17756)

gitdub at big.cc.gt.atl.ga.us gitdub at big.cc.gt.atl.ga.us
Fri Jul 10 19:00:26 EDT 2015


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

On branch  : master
Link       : https://github.com/mlpack/mlpack/compare/4a97187bbba7ce8a6191b714949dd818ef0f37d2...e5905e62c15d1bcff21e6359b11efcd7ab6d7ca0

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

commit 4a177562428fb1185badd38163a516fec2751d52
Author: ryan <ryan at ratml.org>
Date:   Tue Apr 28 15:16:13 2015 -0400

    Remove unnecessary LastDistanceNode().


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

4a177562428fb1185badd38163a516fec2751d52
 src/mlpack/methods/range_search/range_search_stat.hpp | 9 +--------
 src/mlpack/tests/range_search_test.cpp                | 1 -
 2 files changed, 1 insertion(+), 9 deletions(-)

diff --git a/src/mlpack/methods/range_search/range_search_stat.hpp b/src/mlpack/methods/range_search/range_search_stat.hpp
index e6dfa2b..e03502e 100644
--- a/src/mlpack/methods/range_search/range_search_stat.hpp
+++ b/src/mlpack/methods/range_search/range_search_stat.hpp
@@ -24,7 +24,7 @@ class RangeSearchStat
   /**
    * Initialize the statistic.
    */
-  RangeSearchStat() : lastDistanceNode(NULL), lastDistance(0.0) { }
+  RangeSearchStat() : lastDistance(0.0) { }
 
   /**
    * Initialize the statistic given a tree node that this statistic belongs to.
@@ -32,21 +32,14 @@ class RangeSearchStat
    */
   template<typename TreeType>
   RangeSearchStat(TreeType& /* node */) :
-      lastDistanceNode(NULL),
       lastDistance(0.0) { }
 
-  //! Get the last distance evaluation node.
-  void* LastDistanceNode() const { return lastDistanceNode; }
-  //! Modify the last distance evaluation node.
-  void*& LastDistanceNode() { return lastDistanceNode; }
   //! Get the last distance evaluation.
   double LastDistance() const { return lastDistance; }
   //! Modify the last distance evaluation.
   double& LastDistance() { return lastDistance; }
 
  private:
-  //! The last distance evaluation node.
-  void* lastDistanceNode;
   //! The last distance evaluation.
   double lastDistance;
 };
diff --git a/src/mlpack/tests/range_search_test.cpp b/src/mlpack/tests/range_search_test.cpp
index f1cd60d..ec168b1 100644
--- a/src/mlpack/tests/range_search_test.cpp
+++ b/src/mlpack/tests/range_search_test.cpp
@@ -41,7 +41,6 @@ void SortResults(const vector<vector<size_t>>& neighbors,
 template<typename TreeType>
 void CleanTree(TreeType& node)
 {
-  node.Stat().LastDistanceNode() = NULL;
   node.Stat().LastDistance() = 0.0;
 
   for (size_t i = 0; i < node.NumChildren(); ++i)



More information about the mlpack-git mailing list