[mlpack-git] master, mlpack-1.0.x: Add a boolean specifying whether or not the dataset is rearranged when the tree is built. (65bec15)

gitdub at big.cc.gt.atl.ga.us gitdub at big.cc.gt.atl.ga.us
Thu Mar 5 21:42:04 EST 2015


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

On branches: master,mlpack-1.0.x
Link       : https://github.com/mlpack/mlpack/compare/904762495c039e345beba14c1142fd719b3bd50e...f94823c800ad6f7266995c700b1b630d5ffdcf40

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

commit 65bec1564291d2a6c7eb46d30cc43434a9f2cbb8
Author: Ryan Curtin <ryan at ratml.org>
Date:   Thu Feb 6 15:18:12 2014 +0000

    Add a boolean specifying whether or not the dataset is rearranged when the tree
    is built.


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

65bec1564291d2a6c7eb46d30cc43434a9f2cbb8
 src/mlpack/core/tree/binary_space_tree/traits.hpp | 5 +++++
 src/mlpack/core/tree/cover_tree/traits.hpp        | 5 +++++
 src/mlpack/core/tree/tree_traits.hpp              | 5 +++++
 3 files changed, 15 insertions(+)

diff --git a/src/mlpack/core/tree/binary_space_tree/traits.hpp b/src/mlpack/core/tree/binary_space_tree/traits.hpp
index 4ad2651..45d2e66 100644
--- a/src/mlpack/core/tree/binary_space_tree/traits.hpp
+++ b/src/mlpack/core/tree/binary_space_tree/traits.hpp
@@ -46,6 +46,11 @@ class TreeTraits<BinarySpaceTree<BoundType, StatisticType, MatType> >
    * Points are not contained at multiple levels of the binary space tree.
    */
   static const bool HasSelfChildren = false;
+
+  /**
+   * Points are rearranged during building of the tree.
+   */
+  static const bool RearrangesDataset = true;
 };
 
 }; // namespace tree
diff --git a/src/mlpack/core/tree/cover_tree/traits.hpp b/src/mlpack/core/tree/cover_tree/traits.hpp
index 6958ca7..4fe1eaf 100644
--- a/src/mlpack/core/tree/cover_tree/traits.hpp
+++ b/src/mlpack/core/tree/cover_tree/traits.hpp
@@ -48,6 +48,11 @@ class TreeTraits<CoverTree<MetricType, RootPointPolicy, StatisticType> >
    * Cover trees do have self-children.
    */
   static const bool HasSelfChildren = true;
+
+  /**
+   * Points are not rearranged when the tree is built.
+   */
+  static const bool RearrangesDataset = false;
 };
 
 }; // namespace tree
diff --git a/src/mlpack/core/tree/tree_traits.hpp b/src/mlpack/core/tree/tree_traits.hpp
index 65f40ca..770169b 100644
--- a/src/mlpack/core/tree/tree_traits.hpp
+++ b/src/mlpack/core/tree/tree_traits.hpp
@@ -95,6 +95,11 @@ class TreeTraits
    * (Child(0)) are also contained in that node.
    */
   static const bool HasSelfChildren = false;
+
+  /**
+   * This is true if the tree rearranges points in the dataset when it is built.
+   */
+  static const bool RearrangesDataset = false;
 };
 
 }; // namespace tree



More information about the mlpack-git mailing list