[mlpack-git] master: 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. (d305c20)

gitdub at big.cc.gt.atl.ga.us gitdub at big.cc.gt.atl.ga.us
Thu Mar 5 22:00:29 EST 2015


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

On branch  : master
Link       : https://github.com/mlpack/mlpack/compare/904762495c039e345beba14c1142fd719b3bd50e...f94823c800ad6f7266995c700b1b630d5ffdcf40

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

commit d305c2032d0b3a74988db2f27fbe913ad047cf23
Author: Ryan Curtin <ryan at ratml.org>
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.


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

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



More information about the mlpack-git mailing list