[mlpack-git] master: Add typedefs for common tree types. (9c8e313)

gitdub at big.cc.gt.atl.ga.us gitdub at big.cc.gt.atl.ga.us
Wed Jul 29 16:41:40 EDT 2015


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

On branch  : master
Link       : https://github.com/mlpack/mlpack/compare/f8ceffae0613b350f4d6bdd46c6c8633a40b4897...6ee21879488fe98612a4619b17f8b51e8da5215b

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

commit 9c8e31301def34d15d0fb283a27ab03f33151884
Author: ryan <ryan at ratml.org>
Date:   Wed Jul 22 22:07:36 2015 -0400

    Add typedefs for common tree types.


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

9c8e31301def34d15d0fb283a27ab03f33151884
 src/mlpack/core/tree/binary_space_tree/typedef.hpp | 60 ++++++++++++++++++++++
 1 file changed, 60 insertions(+)

diff --git a/src/mlpack/core/tree/binary_space_tree/typedef.hpp b/src/mlpack/core/tree/binary_space_tree/typedef.hpp
new file mode 100644
index 0000000..639fff0
--- /dev/null
+++ b/src/mlpack/core/tree/binary_space_tree/typedef.hpp
@@ -0,0 +1,60 @@
+/**
+ * @file typedef.hpp
+ * @author Ryan Curtin
+ *
+ * Template typedefs for the BinarySpaceTree class that satisfy the requirements
+ * of the TreeType policy class.
+ */
+#ifndef __MLPACK_CORE_TREE_BINARY_SPACE_TREE_TYPEDEF_HPP
+#define __MLPACK_CORE_TREE_BINARY_SPACE_TREE_TYPEDEF_HPP
+
+// In case it hasn't been included yet.
+#include "../binary_space_tree.hpp"
+
+namespace mlpack {
+namespace tree {
+
+/**
+ * midpoint split kd-tree
+ */
+template<typename MetricType, typename StatisticType, typename MatType>
+using KDTree = BinarySpaceTree<MetricType,
+                               StatisticType,
+                               MatType,
+                               HRectBound<MetricType>,
+                               MidpointSplit<BoundType, MetricType>>;
+
+/**
+ * mean split kd-tree
+ */
+template<typename MetricType, typename StatisticType, typename MatType>
+using MeanSplitKDTree = BinarySpaceTree<MetricType,
+                                        StatisticType,
+                                        MatType,
+                                        HRectBound<MetricType>,
+                                        MeanSplit<BoundType, MetricType>>;
+
+/**
+ * midpoint split ball tree
+ */
+template<typename MetricType, typename StatisticType, typename MatType>
+using BallTree = BinarySpaceTree<MetricType,
+                                 StatisticType,
+                                 MatType,
+                                 HRectBound<MetricType>,
+                                 MidpointSplit<BoundType, MetricType>>;
+
+/**
+ * mean split ball tree
+ */
+template<typename MetricType, typename StatisticType, typename MatType>
+using MeanSplitBallTree = BinarySpaceTree<MetricType,
+                                          StatisticType,
+                                          MatType,
+                                          HRectBound<MetricType>,
+                                          MeanSplit<BoundType, MetricType>>;
+
+} // namespace tree
+} // namespace mlpack
+
+#endif



More information about the mlpack-git mailing list