<p>I see two posiibilities:<br>
1. I can fix <code>SplitNonLeafNode()</code> in such a way as to work up the case when a node has only one child and has'not got the parent (i.e. this is the root). So <code>CondenseTree()</code> should invoke this method in the case discussed.<br>
2. The second way is to create a new method in <code>SplitType</code> e.g. <code>CondenseToRoot()</code> and invoke this method in <code>CondenseTree()</code>.</p>

<p>I think the second one is better. The <code>normalNodeMaxNumChildren</code> was introduced in order to reduce memory usage since the leaf nodes do not contain children and the parent of a leaf node can be a supernode. So if I split a leaf node, the resulting nodes should not allocate the space like the parent of the leaf node.</p>

<p>What do you think about it?</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 or <a href="https://github.com/mlpack/mlpack/pull/556#issuecomment-207930606">view it on GitHub</a><img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFNHDK-OomVszgiPcMPlX9HH46k7Dks5p2JbhgaJpZM4HsSai.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/556#issuecomment-207930606"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>