<p>In <a href="https://github.com/mlpack/mlpack/pull/664#discussion_r67932653">src/mlpack/core/tree/rectangle_tree/discrete_hilbert_value_impl.hpp</a>:</p>
<pre style='color:#555'>> + ownsLocalDataset(false),
> + numValues(0),
> + valueToInsert(tree->Parent() ?
> + tree->Parent()->AuxiliaryInfo().HilbertValue().ValueToInsert() :
> + new arma::Col<HilbertElemType>(tree->Dataset().n_rows)),
> + ownsValueToInsert(tree->Parent() ? false : true)
> +{
> + // Calculate the Hilbert value for all points
> + if (!tree->Parent()) // This is the root node
> + ownsLocalDataset = true;
> + else if (tree->Parent()->Children()[0]->IsLeaf())
> + {
> + // This is a leaf node
> + assert(tree->Parent()->NumChildren() > 0);
> + ownsLocalDataset = true;
> + }
</pre>
<p>Okay, I understand. I see that each node holds a <code>DiscreteHilbertValue</code> object, and each <code>DiscreteHilbertValue</code> object stores its own local vector of Hilbert values for each point contained in the node. So it makes sense to keep the <code>localDataset</code> object so we can avoid resizing the Hilbert values vector, but I think we should rename it to <code>localHilbertValues</code> or something like that.</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#r67932653">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe/AJ4bFIgh1J__B7VdoMi-cogTMi0zwtBeks5qODb8gaJpZM4IrlzT">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFEsfMEyiVB3DQDSr87WKFiipobSjks5qODb8gaJpZM4IrlzT.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#r67932653"></link>
<meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>