[mlpack] 32/324: more R tree stuff.

Barak A. Pearlmutter barak+git at cs.nuim.ie
Sun Aug 17 08:21:53 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 ce0674637b61aa4e2f3eb35cb956fff916231e3c
Author: andrewmw94 <andrewmw94 at 9d5b8971-822b-0410-80eb-d18c1038ef23>
Date:   Tue May 27 12:17:52 2014 +0000

    more R tree stuff.
    
    git-svn-id: http://svn.cc.gatech.edu/fastlab/mlpack/trunk@16565 9d5b8971-822b-0410-80eb-d18c1038ef23
---
 src/mlpack/core/tree/rectangle_tree.hpp                   |  4 ++--
 .../core/tree/rectangle_tree/rectangle_tree_impl.hpp      | 15 ++++++++-------
 2 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/src/mlpack/core/tree/rectangle_tree.hpp b/src/mlpack/core/tree/rectangle_tree.hpp
index 12f30fd..7330adc 100644
--- a/src/mlpack/core/tree/rectangle_tree.hpp
+++ b/src/mlpack/core/tree/rectangle_tree.hpp
@@ -5,8 +5,8 @@
  * Include all the necessary filse to use the Rectangle Type Trees (RTree, RStarTree, XTree,
  * and HilbertRTree.)
  */
-#ifndef __MLPACK_CORE_TREE_RECTINGLINEAR_TREE_RECTANGLINEAR_TREE_HPP
-#define __MLPACK_CORE_TREE_RECTINGLINEAR_TREE_RECTANGLINEAR_TREE_HPP
+#ifndef __MLPACK_CORE_TREE_RECTINGLE_TREE_RECTANGLE_TREE_HPP
+#define __MLPACK_CORE_TREE_RECTINGLE_TREE_RECTANGLE_TREE_HPP
 
 /* we include bounds.hpp since it gives us the necessary files.
  * However, we will not use the "ballbounds" option.
diff --git a/src/mlpack/core/tree/rectangle_tree/rectangle_tree_impl.hpp b/src/mlpack/core/tree/rectangle_tree/rectangle_tree_impl.hpp
index ddc009c..0968edc 100644
--- a/src/mlpack/core/tree/rectangle_tree/rectangle_tree_impl.hpp
+++ b/src/mlpack/core/tree/rectangle_tree/rectangle_tree_impl.hpp
@@ -35,20 +35,21 @@ RectangleTree<StatisticType, MatType, SplitType>::RectangleTree(
  */
 template<typename StatisticType,
 	 typename MatType,
-	 typename SplitType>
-RectangleTree<StatisticType, MatType, SplitType>::
+	 typename SplitType
+	 typename HueristicType>
+RectangleTree<StatisticType, MatType, SplitType, HueristicType>::
     InsertPoint(const arma::vec& point)
 {
   if(numChildren == 0) {
-    data[points++] = point;
+    data.col(points++) = point;
     return;
   }
-  double minDist = children[0].minDistance(point);
+  double minScore = HueristicType.EvalNode(children[0].bound, point);
   int bestIndex = 0;
   for(int i = 1; i < numChildren; i++) {
-    double dist = children[i].minDistance(point);
-    if(dist < minDist) {
-      minDist = dist;
+    double score = HueristicType.EvalNode(children[i].bound, point);
+    if(score < minScore) {
+      minScore = score;
       bestIndex = i
     }
   }

-- 
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