<p>In <a href="https://github.com/mlpack/mlpack/pull/664#discussion_r67772032">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>Should we change this now? If we have decided that the <code>localDataset</code> should be removed from <code>RectangleTree</code>, then I think that we can change <code>localDataset</code> and <code>ownsLocalDataset</code> here to <code>dataset</code> and <code>ownsDataset</code>, and make <code>ownsDataset</code> only true when the node is the root, not also when it is a leaf. Maybe <code>hilbertValues</code> is a better name than <code>dataset</code>, since that object is holding the Hilbert values for each dimension, not the actual dataset itself.</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#r67772032">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe/AJ4bFJb0Sik7LVIQYC9ty_7Rb-0mQ1Khks5qNwj4gaJpZM4IrlzT">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFGPFf8RR34qVnQ7DjQwzhwlQ91beks5qNwj4gaJpZM4IrlzT.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#r67772032"></link>
<meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>