<p>It seems I understood how git-cherry-pick works. If I understand correctly this branch will not be built until   the Hilbert R tree PR is merged.<br>
Right now the R+ tree passes <code>RectangleTreeTest/RPlusTreeOverlapTest</code> and <code>RectangleTreeTest/RPlusTreeTraverserTest</code>.<br>
I am not sure that the partition algorithm works correctly in general (I am not sure that the resulting nodes will not be overfull). The R+ tree paper enumerates four criteria (section 4 Packing Algorithm). I implemented the criterion "minimal total space coverage accrued by the two subregions". Maybe it is good idea to add a template parameter SweepType since there is another clear criterion "minimal number of rectangle splits". But I do not undestand how should work the criteria "nearest neghbors" and "minimal total x and y displacement" and the paper does not explain that.</p>

<p>Also I should use <br>
<code>double RPlusTreeSplit::SweepLeafNode(size_t axis, const TreeType* node,<br>
    size_t fillFactor, ElemType&amp; axisCut)</code><br>
instead of<br>
<code>double RPlusTreeSplit::SweepLeafNode(size_t axis, const TreeType* node,<br>
    size_t fillFactor, double&amp; axisCut)</code></p>

<p>The insertion algorithm tries to find the node that contains the point that is being inserted. If there are no such nodes the algorithm tries to enlarge a node. If the algorithm failed an empty node is added to the tree.</p>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>&nbsp;&nbsp;<a href='https://github.com/mlpack/mlpack/pull/699'>https://github.com/mlpack/mlpack/pull/699</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>R+ tree implementation</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/mlpack/mlpack/pull/699/files#diff-0">src/mlpack/core/tree/CMakeLists.txt</a>
    (4)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/mlpack/mlpack/pull/699/files#diff-1">src/mlpack/core/tree/rectangle_tree.hpp</a>
    (2)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/mlpack/mlpack/pull/699/files#diff-2">src/mlpack/core/tree/rectangle_tree/r_plus_tree_descent_heuristic.hpp</a>
    (49)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/mlpack/mlpack/pull/699/files#diff-3">src/mlpack/core/tree/rectangle_tree/r_plus_tree_descent_heuristic_impl.hpp</a>
    (96)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/mlpack/mlpack/pull/699/files#diff-4">src/mlpack/core/tree/rectangle_tree/r_plus_tree_split.hpp</a>
    (95)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/mlpack/mlpack/pull/699/files#diff-5">src/mlpack/core/tree/rectangle_tree/r_plus_tree_split_impl.hpp</a>
    (441)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/mlpack/mlpack/pull/699/files#diff-6">src/mlpack/core/tree/rectangle_tree/r_star_tree_split_impl.hpp</a>
    (3)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/mlpack/mlpack/pull/699/files#diff-7">src/mlpack/core/tree/rectangle_tree/r_tree_split_impl.hpp</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/mlpack/mlpack/pull/699/files#diff-8">src/mlpack/core/tree/rectangle_tree/rectangle_tree_impl.hpp</a>
    (4)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/mlpack/mlpack/pull/699/files#diff-9">src/mlpack/core/tree/rectangle_tree/typedef.hpp</a>
    (8)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/mlpack/mlpack/pull/699/files#diff-10">src/mlpack/core/tree/rectangle_tree/x_tree_split_impl.hpp</a>
    (3)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/mlpack/mlpack/pull/699/files#diff-11">src/mlpack/tests/rectangle_tree_test.cpp</a>
    (90)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/mlpack/mlpack/pull/699.patch'>https://github.com/mlpack/mlpack/pull/699.patch</a></li>
  <li><a href='https://github.com/mlpack/mlpack/pull/699.diff'>https://github.com/mlpack/mlpack/pull/699.diff</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/mlpack/mlpack/pull/699">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe/AJ4bFHNC9fgAqKHZuSVqS9rQZngcm7_Dks5qMMohgaJpZM4I3ATw">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFMvFOB3MskD8gI_fsG52AH1o4Afnks5qMMohgaJpZM4I3ATw.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/mlpack/mlpack/pull/699"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>