[mlpack-git] master: First commit, no code yet; just moving systems. (7c946db)

gitdub at mlpack.org gitdub at mlpack.org
Tue Oct 4 14:11:32 EDT 2016


Repository : https://github.com/mlpack/mlpack
On branch  : master
Link       : https://github.com/mlpack/mlpack/compare/9ef7339d40550a974b3939e9fcb966fac2c09065...ebdb5abeaa3fd621a06ae663862bb72df76d2b40

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

commit 7c946dbd44b6841204175c87106e3b98e7264e44
Author: Ryan Curtin <ryan at ratml.org>
Date:   Wed Sep 7 17:11:22 2016 -0400

    First commit, no code yet; just moving systems.


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

7c946dbd44b6841204175c87106e3b98e7264e44
 src/mlpack/core/tree/octree/octree.hpp | 39 ++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)

diff --git a/src/mlpack/core/tree/octree/octree.hpp b/src/mlpack/core/tree/octree/octree.hpp
new file mode 100644
index 0000000..30d6bce
--- /dev/null
+++ b/src/mlpack/core/tree/octree/octree.hpp
@@ -0,0 +1,39 @@
+/**
+ * @file octree.hpp
+ * @author Ryan Curtin
+ *
+ * Definition of generalized octree (Octree).
+ */
+#ifndef MLPACK_CORE_TREE_OCTREE_OCTREE_HPP
+#define MLPACK_CORE_TREE_OCTREE_OCTREE_HPP
+
+#include <mlpack/core.hpp>
+#include "../hrectbound.hpp"
+
+namespace mlpack {
+namespace tree {
+
+template<typename MetricType,
+         typename StatisticType = EmptyStatistic,
+         typename MatType = arma::mat>
+class Octree
+{
+ public:
+  //! So other classes can use TreeType::Mat.
+  typedef MatType Mat;
+  //! The type of element held in MatType.
+  typedef typename MatType::elem_type ElemType;
+
+ private:
+  //! The children held by this node.
+  std::vector<Octree*> children;
+
+  //! The index of the first point in the dataset contained in this node (and
+  //! its children).
+  size_t begin;
+  //! The number of points of the dataset contained in this node (and its
+  //! children).
+  size_t count;
+
+  
+};




More information about the mlpack-git mailing list