<p>In <a href="https://github.com/mlpack/mlpack/pull/664#discussion_r67891986">src/mlpack/core/tree/rectangle_tree/hilbert_r_tree_auxiliary_information_impl.hpp</a>:</p>
<pre style='color:#555'>&gt; +  {
&gt; +    // Get the position at which the point should be inserted
&gt; +    // Update the largest Hilbert value of the node
&gt; +    size_t pos = hilbertValue.InsertPoint(node, node-&gt;Dataset().col(point));
&gt; +
&gt; +    // Move points
&gt; +    for (size_t i = node-&gt;NumPoints(); i &gt; pos; i--)
&gt; +      node-&gt;Points()[i] = node-&gt;Points()[i-1];
&gt; +    // Insert the point
&gt; +    node-&gt;Points()[pos] = point;
&gt; +    node-&gt;Count()++;
&gt; +  }
&gt; +  else
&gt; +  {
&gt; +    // Calculate the Hilbert value
&gt; +    hilbertValue.InsertPoint(node, node-&gt;Dataset().col(point));
</pre>
<p>I think it would be possible here to just pass <code>point</code> instead of <code>node-&gt;Dataset().col(point)</code>, and then refactor <code>DiscreteHilbertValue::InsertPoint()</code> to take a <code>size_t</code> instead, since we only have one dataset.  But it is up to you if you want to do that.  I don't think there would be any noticeable advantage or disadvantage.</p>

<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/664/files/f9127cea62d5ce1ad8d5f59931de108a2f7cdd9b#r67891986">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe/AJ4bFNTD1LWHUYe6OJ4UnyGSE5mfCYm-ks5qOAPzgaJpZM4IrlzT">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFGjPs0Fh5YwLcf2CqbHLTq0kx5SGks5qOAPzgaJpZM4IrlzT.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/664/files/f9127cea62d5ce1ad8d5f59931de108a2f7cdd9b#r67891986"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>