[mlpack-git] master: Add convenience template typedefs. (b1616c0)
gitdub at big.cc.gt.atl.ga.us
gitdub at big.cc.gt.atl.ga.us
Wed Jul 29 16:42:19 EDT 2015
Repository : https://github.com/mlpack/mlpack
On branch : master
Link : https://github.com/mlpack/mlpack/compare/f8ceffae0613b350f4d6bdd46c6c8633a40b4897...6ee21879488fe98612a4619b17f8b51e8da5215b
>---------------------------------------------------------------
commit b1616c05fab8413affa896c777838766a58564f0
Author: ryan <ryan at ratml.org>
Date: Sun Jul 26 23:08:15 2015 -0400
Add convenience template typedefs.
>---------------------------------------------------------------
b1616c05fab8413affa896c777838766a58564f0
src/mlpack/core/tree/cover_tree/typedef.hpp | 24 ++++++++++++
src/mlpack/core/tree/rectangle_tree/typedef.hpp | 50 +++++++++++++++++++++++++
2 files changed, 74 insertions(+)
diff --git a/src/mlpack/core/tree/cover_tree/typedef.hpp b/src/mlpack/core/tree/cover_tree/typedef.hpp
new file mode 100644
index 0000000..164af2e
--- /dev/null
+++ b/src/mlpack/core/tree/cover_tree/typedef.hpp
@@ -0,0 +1,24 @@
+/**
+ * @file typedef.hpp
+ * @author Ryan Curtin
+ *
+ * Typedef of cover tree to match TreeType API.
+ */
+#ifndef __MLPACK_CORE_TREE_COVER_TREE_TYPEDEF_HPP
+#define __MLPACK_CORE_TREE_COVER_TREE_TYPEDEF_HPP
+
+#include "cover_tree.hpp"
+
+namespace mlpack {
+namespace tree {
+
+template<typename MetricType, typename StatisticType, typename MatType>
+using StandardCoverTree = CoverTree<MetricType,
+ StatisticType,
+ MatType,
+ FirstPointIsRoot>;
+
+} // namespace tree
+} // namespace mlpack
+
+#endif
diff --git a/src/mlpack/core/tree/rectangle_tree/typedef.hpp b/src/mlpack/core/tree/rectangle_tree/typedef.hpp
new file mode 100644
index 0000000..dd5906e
--- /dev/null
+++ b/src/mlpack/core/tree/rectangle_tree/typedef.hpp
@@ -0,0 +1,50 @@
+/**
+ * @file typedef.hpp
+ * @author Ryan Curtin
+ *
+ * Typedefs of RectangleTrees, for use by classes that require trees matching
+ * the TreeType API.
+ */
+#ifndef __MLPACK_CORE_TREE_RECTANGLE_TREE_TYPEDEF_HPP
+#define __MLPACK_CORE_TREE_RECTANGLE_TREE_TYPEDEF_HPP
+
+#include "rectangle_tree.hpp"
+
+namespace mlpack {
+namespace tree {
+
+/**
+ * regular r-tree
+ */
+template<typename MetricType, typename StatisticType, typename MatType>
+using RTree = RectangleTree<MetricType,
+ StatisticType,
+ MatType,
+ RTreeSplit,
+ RTreeDescentHeuristic>;
+
+/**
+ * r*-tree
+ */
+template<typename MetricType, typename StatisticType, typename MatType>
+using RStarTree = RectangleTree<MetricType,
+ StatisticType,
+ MatType,
+ RStarTreeSplit,
+ RStarTreeDescentHeuristic>;
+
+/**
+ * X-tree
+ * (not yet finished)
+ */
+//template<typename MetricType, typename StatisticType, typename MatType>
+//using XTree = RectangleTree<MetricType,
+// StatisticType,
+// MatType,
+// XTreeSplit,
+// XTreeDescentHeuristic>;
+
+} // namespace tree
+} // namespace mlpack
+
+#endif
More information about the mlpack-git
mailing list