[mlpack-git] master: Fixed comments. Added some bibtex information for the Hilbert R tree. (f9127ce)

gitdub at mlpack.org gitdub at mlpack.org
Mon Jun 20 08:29:11 EDT 2016


Repository : https://github.com/mlpack/mlpack
On branch  : master
Link       : https://github.com/mlpack/mlpack/compare/37fda23945b4f998cd5fa6ec011ae345236c8552...479eca0c625cc4255a3b1a354a4788dae10f1b01

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

commit f9127cea62d5ce1ad8d5f59931de108a2f7cdd9b
Author: Mikhail Lozhnikov <lozhnikovma at gmail.com>
Date:   Mon Jun 20 15:29:11 2016 +0300

    Fixed comments. Added some bibtex information for the Hilbert R tree.


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

f9127cea62d5ce1ad8d5f59931de108a2f7cdd9b
 .../core/tree/rectangle_tree/rectangle_tree.hpp    | 29 ++++++++++------------
 .../tree/rectangle_tree/rectangle_tree_impl.hpp    |  5 +---
 src/mlpack/core/tree/rectangle_tree/typedef.hpp    | 23 ++++++++++++++---
 3 files changed, 34 insertions(+), 23 deletions(-)

diff --git a/src/mlpack/core/tree/rectangle_tree/rectangle_tree.hpp b/src/mlpack/core/tree/rectangle_tree/rectangle_tree.hpp
index 8c23522..0f2d9cc 100644
--- a/src/mlpack/core/tree/rectangle_tree/rectangle_tree.hpp
+++ b/src/mlpack/core/tree/rectangle_tree/rectangle_tree.hpp
@@ -35,6 +35,8 @@ namespace tree /** Trees and tree-building procedures. */ {
  * @tparam SplitType The type of split to use when inserting points.
  * @tparam DescentType The heuristic to use when descending the tree to insert
  *    points.
+ * @tparam AuxiliaryInformationType An auxiliary information contained
+ *    in the node. This information depends on the type of the RectangleTree.
  */
 
 template<typename MetricType = metric::EuclideanDistance,
@@ -188,26 +190,23 @@ class RectangleTree
   void SoftDelete();
 
   /**
-   * Set dataset to null. Used for memory management.  Be cafeful.
+   * Nullify the auxiliary information. Used for memory management.
+   * Be cafeful.
    */
   void NullifyData();
 
   /**
-   * Inserts a point into the tree. The point will be copied to the data matrix
-   * of the leaf node where it is finally inserted, but we pass by reference
-   * since it may be passed many times before it actually reaches a leaf.
+   * Inserts a point into the tree.
    *
-   * @param point The point (arma::vec&) to be inserted.
+   * @param point The index of a point in the dataset.
    */
   void InsertPoint(const size_t point);
 
   /**
    * Inserts a point into the tree, tracking which levels have been inserted
-   * into.  The point will be copied to the data matrix of the leaf node where
-   * it is finally inserted, but we pass by reference since it may be passed
-   * many times before it actually reaches a leaf.
+   * into.
    *
-   * @param point The point (arma::vec&) to be inserted.
+   * @param point The index of a point in the dataset.
    * @param relevels The levels that have been reinserted to on this top level
    *      insertion.
    */
@@ -229,9 +228,8 @@ class RectangleTree
                   std::vector<bool>& relevels);
 
   /**
-   * Deletes a point in the tree.  The point will be removed from the data
-   * matrix of the leaf node where it is store and the bounding rectangles will
-   * be updated.  However, the point will be kept in the centeral dataset. (The
+   * Deletes a point from the treeand, updates the bounding rectangle.
+   * However, the point will be kept in the centeral dataset. (The
    * user may remove it from there if he wants, but he must not change the
    * indices of the other points.) Returns true if the point is successfully
    * removed and false if it is not.  (ie. the point is not in the tree)
@@ -239,10 +237,9 @@ class RectangleTree
   bool DeletePoint(const size_t point);
 
   /**
-   * Deletes a point in the tree, tracking levels.  The point will be removed
-   * from the data matrix of the leaf node where it is store and the bounding
-   * rectangles will be updated.  However, the point will be kept in the
-   * centeral dataset. (The user may remove it from there if he wants, but he
+   * Deletes a point from the tree, updates the bounding rectangle,
+   * tracking levels. However, the point will be kept in the centeral dataset.
+   * (The user may remove it from there if he wants, but he
    * must not change the indices of the other points.) Returns true if the point
    * is successfully removed and false if it is not.  (ie. the point is not in
    * the tree)
diff --git a/src/mlpack/core/tree/rectangle_tree/rectangle_tree_impl.hpp b/src/mlpack/core/tree/rectangle_tree/rectangle_tree_impl.hpp
index b087f79..c11d62c 100644
--- a/src/mlpack/core/tree/rectangle_tree/rectangle_tree_impl.hpp
+++ b/src/mlpack/core/tree/rectangle_tree/rectangle_tree_impl.hpp
@@ -237,7 +237,7 @@ void RectangleTree<MetricType, StatisticType, MatType, SplitType, DescentType,
 }
 
 /**
- * Set the local dataset to null.
+ * Nullify the auxiliary information.
  */
 template<typename MetricType,
          typename StatisticType,
@@ -292,9 +292,6 @@ void RectangleTree<MetricType, StatisticType, MatType, SplitType, DescentType,
 
 /**
  * Inserts a point into the tree, tracking which levels have been inserted into.
- * The point will be copied to the data matrix of the leaf node where it is
- * finally inserted, but we pass by reference since it may be passed many times
- * before it actually reaches a leaf.
  */
 template<typename MetricType,
          typename StatisticType,
diff --git a/src/mlpack/core/tree/rectangle_tree/typedef.hpp b/src/mlpack/core/tree/rectangle_tree/typedef.hpp
index 6622099..c16b418 100644
--- a/src/mlpack/core/tree/rectangle_tree/typedef.hpp
+++ b/src/mlpack/core/tree/rectangle_tree/typedef.hpp
@@ -96,11 +96,28 @@ using XTree = RectangleTree<MetricType,
                             XTreeAuxiliaryInformation>;
 
 /**
- * The Hilbert R-tree, a variant of the R tree with an ordering along the Hilbert curve. This template typedef
- * satisfies the TreeType policy API.
+ * The Hilbert R-tree, a variant of the R tree with an ordering along
+ * the Hilbert curve. This template typedef satisfies the TreeType policy API.
+ *
+ * @code
+ * @inproceedings{kamel1994r,
+ *   author = {Kamel, Ibrahim and Faloutsos, Christos},
+ *   title = {Hilbert R-tree: An Improved R-tree Using Fractals},
+ *   booktitle = {Proceedings of the 20th International Conference on Very Large Data Bases},
+ *   series = {VLDB '94},
+ *   year = {1994},
+ *   isbn = {1-55860-153-8},
+ *   pages = {500--509},
+ *   numpages = {10},
+ *   url = {http://dl.acm.org/citation.cfm?id=645920.673001},
+ *   acmid = {673001},
+ *   publisher = {Morgan Kaufmann Publishers Inc.},
+ *   address = {San Francisco, CA, USA}
+ * }
+ * @endcode
  *
+ * @see @ref trees, RTree, DiscreteHilbertRTree
  */
-
 template<typename TreeType>
 using RecursiveHilbertRTreeAuxiliaryInformation =
       HilbertRTreeAuxiliaryInformation<TreeType,RecursiveHilbertValue>;




More information about the mlpack-git mailing list