<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'>&gt; +    ownsLocalDataset(false),
&gt; +    numValues(0),
&gt; +    valueToInsert(tree-&gt;Parent() ? 
&gt; +                tree-&gt;Parent()-&gt;AuxiliaryInfo().HilbertValue().ValueToInsert() :
&gt; +                new arma::Col&lt;HilbertElemType&gt;(tree-&gt;Dataset().n_rows)),
&gt; +    ownsValueToInsert(tree-&gt;Parent() ? false : true)
&gt; +{
&gt; +  // Calculate the Hilbert value for all points
&gt; +  if (!tree-&gt;Parent()) //  This is the root node
&gt; +    ownsLocalDataset = true;
&gt; +  else if (tree-&gt;Parent()-&gt;Children()[0]-&gt;IsLeaf())
&gt; +  {
&gt; +    // This is a leaf node
&gt; +    assert(tree-&gt;Parent()-&gt;NumChildren() &gt; 0);
&gt; +    ownsLocalDataset = true;
&gt; +  }
</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;">&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#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>