[mlpack-svn] r16565 - in mlpack/trunk/src/mlpack/core/tree: . rectangle_tree

fastlab-svn at coffeetalk-1.cc.gatech.edu fastlab-svn at coffeetalk-1.cc.gatech.edu
Tue May 27 08:17:52 EDT 2014


Author: andrewmw94
Date: Tue May 27 08:17:52 2014
New Revision: 16565

Log:
more R tree stuff.

Modified:
   mlpack/trunk/src/mlpack/core/tree/rectangle_tree.hpp
   mlpack/trunk/src/mlpack/core/tree/rectangle_tree/rectangle_tree_impl.hpp

Modified: mlpack/trunk/src/mlpack/core/tree/rectangle_tree.hpp
==============================================================================
--- mlpack/trunk/src/mlpack/core/tree/rectangle_tree.hpp	(original)
+++ mlpack/trunk/src/mlpack/core/tree/rectangle_tree.hpp	Tue May 27 08:17:52 2014
@@ -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.

Modified: mlpack/trunk/src/mlpack/core/tree/rectangle_tree/rectangle_tree_impl.hpp
==============================================================================
--- mlpack/trunk/src/mlpack/core/tree/rectangle_tree/rectangle_tree_impl.hpp	(original)
+++ mlpack/trunk/src/mlpack/core/tree/rectangle_tree/rectangle_tree_impl.hpp	Tue May 27 08:17:52 2014
@@ -35,20 +35,21 @@
  */
 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
     }
   }



More information about the mlpack-svn mailing list