[mlpack] 49/324: fixed some mistakes. Still commented out to allow build.

Barak A. Pearlmutter barak+git at cs.nuim.ie
Sun Aug 17 08:21:55 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 35db7529fbec124b6c7be7e3b9f2355d2f377d72
Author: andrewmw94 <andrewmw94 at 9d5b8971-822b-0410-80eb-d18c1038ef23>
Date:   Mon Jun 9 18:06:25 2014 +0000

    fixed some mistakes.  Still commented out to allow build.
    
    git-svn-id: http://svn.cc.gatech.edu/fastlab/mlpack/trunk@16678 9d5b8971-822b-0410-80eb-d18c1038ef23
---
 src/mlpack/core/tree/rectangle_tree.hpp               |  4 ++--
 .../core/tree/rectangle_tree/rectangle_tree.hpp       | 19 ++++++++++++-------
 .../core/tree/rectangle_tree/rectangle_tree_impl.hpp  | 10 +++++-----
 .../tree/rectangle_tree/rectangle_tree_traverser.hpp  |  8 ++++----
 .../rectangle_tree/rectangle_tree_traverser_impl.hpp  |  8 ++++----
 src/mlpack/methods/neighbor_search/allknn_main.cpp    | 10 +++++-----
 6 files changed, 32 insertions(+), 27 deletions(-)

diff --git a/src/mlpack/core/tree/rectangle_tree.hpp b/src/mlpack/core/tree/rectangle_tree.hpp
index 07907bf..743f7f5 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_RECTINGLE_TREE_RECTANGLE_TREE_HPP
-#define __MLPACK_CORE_TREE_RECTINGLE_TREE_RECTANGLE_TREE_HPP
+#ifndef __MLPACK_CORE_TREE_RECTANGLE_TREE_HPP
+#define __MLPACK_CORE_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.hpp b/src/mlpack/core/tree/rectangle_tree/rectangle_tree.hpp
index 641a315..3b7cbc4 100644
--- a/src/mlpack/core/tree/rectangle_tree/rectangle_tree.hpp
+++ b/src/mlpack/core/tree/rectangle_tree/rectangle_tree.hpp
@@ -4,13 +4,18 @@
  *
  * Definition of generalized rectangle type trees (r_tree, r_star_tree, x_tree, and hilbert_r_tree).
  */
-#ifndef __MLPACK_CORE_TREE_RECTINGLE_TREE_RECTANGLE_TREE_HPP
-#define __MLPACK_CORE_TREE_RECTINGLE_TREE_RECTANGLE_TREE_HPP
+#ifndef __MLPACK_CORE_TREE_RECTANGLE_TREE_RECTANGLE_TREE_HPP
+#define __MLPACK_CORE_TREE_RECTANGLE_TREE_RECTANGLE_TREE_HPP
 
 #include <mlpack/core.hpp>
 
+#include "../hrectbound.hpp"
 #include "../statistic.hpp"
 
+#ifdef __MLPACK_CORE_TREE_HRECTBOUND_HPP
+#define max(a, b) 5  //something to break the build
+#endif
+
 namespace mlpack {
 namespace tree /** Trees and tree-building procedures. */ {
 
@@ -30,10 +35,10 @@ namespace tree /** Trees and tree-building procedures. */ {
  * @tparam DescentType The heuristic to use when descending the tree to insert points.
  */   
 
-template<typename StatisticType = EmptyStatistic,
-	 typename MatType = arma::mat,
-	 typename SplitType = EmptySplit,
-	 typename DescentType = EmptyDescent>
+template<typename SplitType,
+	 typename DescentType,
+	 typename StatisticType = EmptyStatistic,
+	 typename MatType = arma::mat>
 class RectangleTree
 {
  private:
@@ -183,7 +188,7 @@ class RectangleTree
   arma::mat& Dataset() { return dataset; }
 
   //! Get the metric which the tree uses.
-  typename BoundType::MetricType Metric() const { return bound.Metric(); }
+  typename HRectBound::MetricType Metric() const { return bound.Metric(); }
 
   //! Get the centroid of the node and store it in the given vector.
   void Centroid(arma::vec& centroid) { bound.Centroid(centroid); }
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 87c042b..430919a 100644
--- a/src/mlpack/core/tree/rectangle_tree/rectangle_tree_impl.hpp
+++ b/src/mlpack/core/tree/rectangle_tree/rectangle_tree_impl.hpp
@@ -17,10 +17,10 @@
 namespace mlpack {
 namespace tree {
 
-template<typename StatisticType,
-	 typename MatType,
-	 typename SplitType,
-	 typename DescentType>
+template<typename SplitType,
+         typename DescentType,
+	 typename StatisticType,
+         typename MatType>
 RectangleTree<StatisticType, MatType, SplitType, DescentType>::RectangleTree(
     MatType& data,
     const size_t maxLeafSize,
@@ -319,7 +319,7 @@ void RectangleTree<StatisticType, MatType, SplitType, DescentType>::SplitNode(
 	   typename MatType,
 	   typename SplitType,
 	 typename DescentType>
-std::string BinarySpaceTree<StatisticType, MatType, SplitType, DescentType>::ToString() const
+std::string RectangleTree<StatisticType, MatType, SplitType, DescentType>::ToString() const
 {
   std::ostringstream convert;
   convert << "RectangleTree [" << this << "]" << std::endl;
diff --git a/src/mlpack/core/tree/rectangle_tree/rectangle_tree_traverser.hpp b/src/mlpack/core/tree/rectangle_tree/rectangle_tree_traverser.hpp
index 17571c4..0ed388b 100644
--- a/src/mlpack/core/tree/rectangle_tree/rectangle_tree_traverser.hpp
+++ b/src/mlpack/core/tree/rectangle_tree/rectangle_tree_traverser.hpp
@@ -16,10 +16,10 @@
 namespace mlpack {
 namespace tree {
 
-template<typename StatisticType,
-         typename MatType,
-         typename SplitType,
-         typename DescentType>
+template<typename SplitType,
+         typename DescentType,
+	 typename StatisticType,
+         typename MatType>
 template<typename RuleType>
 class RectangleTree<StatisticType, MatType, SplitType, DescentType>::
     RectangleTreeTraverser
diff --git a/src/mlpack/core/tree/rectangle_tree/rectangle_tree_traverser_impl.hpp b/src/mlpack/core/tree/rectangle_tree/rectangle_tree_traverser_impl.hpp
index ce09feb..fef0616 100644
--- a/src/mlpack/core/tree/rectangle_tree/rectangle_tree_traverser_impl.hpp
+++ b/src/mlpack/core/tree/rectangle_tree/rectangle_tree_traverser_impl.hpp
@@ -17,10 +17,10 @@
 namespace mlpack {
 namespace tree {
 
-template<typename StatisticType,
-    typename MatType,
-    typename SplitType,
-    typename DescentType>
+template<typename SplitType,
+         typename DescentType,
+	 typename StatisticType,
+         typename MatType>
 template<typename RuleType>
 RectangleTree<StatisticType, MatType, SplitType, DescentType>::
 RectangleTreeTraverser<RuleType>::RectangleTreeTraverser(RuleType& rule) :
diff --git a/src/mlpack/methods/neighbor_search/allknn_main.cpp b/src/mlpack/methods/neighbor_search/allknn_main.cpp
index 1157041..9ede7c7 100644
--- a/src/mlpack/methods/neighbor_search/allknn_main.cpp
+++ b/src/mlpack/methods/neighbor_search/allknn_main.cpp
@@ -272,11 +272,11 @@ int main(int argc, char *argv[])
       // Build the reference tree.
       Log::Info << "Building reference tree..." << endl;
       Timer::Start("tree_building");
-//       RectangleTree<NeighborSearchStat<NearestNeighborSort>,
-//                                  arma::mat,
-//                                  tree::RTreeSplit,
-//                                  tree::RTreeDescentHeuristic>
-//       refTree(referenceData, leafSize);
+//        RectangleTree<NeighborSearchStat<NearestNeighborSort>,
+//                                   arma::mat,
+//                                   tree::RTreeSplit,
+//                                   tree::RTreeDescentHeuristic>
+//        refTree(referenceData, leafSize);
       Timer::Stop("tree_building");
         
     }

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