<p>In <a href="https://github.com/mlpack/mlpack/pull/664#discussion_r67909500">src/mlpack/core/tree/rectangle_tree/hilbert_r_tree_auxiliary_information_impl.hpp</a>:</p>
<pre style='color:#555'>> + {
> + // Get the position at which the point should be inserted
> + // Update the largest Hilbert value of the node
> + size_t pos = hilbertValue.InsertPoint(node, node->Dataset().col(point));
> +
> + // Move points
> + for (size_t i = node->NumPoints(); i > pos; i--)
> + node->Points()[i] = node->Points()[i-1];
> + // Insert the point
> + node->Points()[pos] = point;
> + node->Count()++;
> + }
> + else
> + {
> + // Calculate the Hilbert value
> + hilbertValue.InsertPoint(node, node->Dataset().col(point));
</pre>
<p>Hm.. Right now the DiscreteHilbertValue does not depend on <code>TreeType</code> or <code>MatType</code>. It depends only on <code>TreeElemType</code>. I think this is the weakest requirement. So, I think we should not refactor that. What do you think about it?</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<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#r67909500">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe/AJ4bFCNSNjRnCL2K7pAhbySWvnFfZtdnks5qOBnagaJpZM4IrlzT">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFFKB8MDNwovgFkyxYrQ4CCxhh7aFks5qOBnagaJpZM4IrlzT.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#r67909500"></link>
<meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>