[mlpack] 14/149: Move MAX_OVERLAP to be a member in the mlpack::tree namespace to fix errors on Visual Studio. Thanks to SinisterMJ for pointing this out. #369.

Barak A. Pearlmutter barak+git at pearlmutter.net
Sat May 2 09:11:04 UTC 2015


This is an automated email from the git hooks/post-receive script.

bap pushed a commit to branch svn-trunk
in repository mlpack.

commit 32818d0cd47b4593abff5376443acf709ef8e7cf
Author: rcurtin <rcurtin at 9d5b8971-822b-0410-80eb-d18c1038ef23>
Date:   Wed Sep 24 19:46:31 2014 +0000

    Move MAX_OVERLAP to be a member in the mlpack::tree namespace to fix errors on
    Visual Studio.  Thanks to SinisterMJ for pointing this out.  #369.
    
    
    git-svn-id: http://svn.cc.gatech.edu/fastlab/mlpack/trunk@17188 9d5b8971-822b-0410-80eb-d18c1038ef23
---
 src/mlpack/core/tree/rectangle_tree/x_tree_split.hpp | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/src/mlpack/core/tree/rectangle_tree/x_tree_split.hpp b/src/mlpack/core/tree/rectangle_tree/x_tree_split.hpp
index 68de44c..cab64c7 100644
--- a/src/mlpack/core/tree/rectangle_tree/x_tree_split.hpp
+++ b/src/mlpack/core/tree/rectangle_tree/x_tree_split.hpp
@@ -16,6 +16,14 @@ namespace mlpack {
 namespace tree /** Trees and tree-building procedures. */ {
 
 /**
+ * The X-tree paper says that a maximum allowable overlap of 20% works well.
+ *
+ * This code should eventually be refactored so as to avoid polluting
+ * mlpack::tree with this random double.
+ */
+const double MAX_OVERLAP = 0.2;
+
+/**
  * A Rectangle Tree has new points inserted at the bottom.  When these
  * nodes overflow, we split them, moving up the tree and splitting nodes
  * as necessary.
@@ -28,11 +36,6 @@ class XTreeSplit
 public:
 
 /**
- * The X-tree paper says that a maximum allowable overlap of 20% works well.
- */
-const static double MAX_OVERLAP = 0.2;
-
-/**
  * Split a leaf node using the algorithm described in "The R*-tree: An Efficient and Robust Access method
  * for Points and Rectangles."  If necessary, this split will propagate
  * upwards through the tree.

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