<p>I agree that the second approach is better here.</p>

<p>Unless I have misunderstood, <code>normalModeMaxNumChildren</code> is something specific to the X tree, so I think we should try to remove the member from <code>RectangleTree</code> and put it in <code>XTreeSplit</code> if possible.  I think that this is reasonable, but will require some refactoring (so we can save it for later if you want):</p>

<p>We'd need to make <code>RectangleTree</code> use instantiated split objects and (optionally) descent type objects.  So instead of <code>SplitType::SplitNode()</code>, <code>RectangleTree</code> should hold a <code>SplitType split</code> object (or something like this), and then call <code>split.SplitNode()</code> instead.  That could allow the SplitType to hold state (like for instance the value of <code>normalModeMaxNumChildren</code>), and then the splitting function could make use of that state, and the other R-tree variants wouldn't need to hold something like <code>normalModeMaxNumChildren</code>.</p>

<p>Let me know what you think; hopefully I have understood everything correctly.  Like I said I'm happy to leave <code>normalModeMaxNumChildren</code> in the code for now and then open a ticket noting that it should be refactored at some point later in the future.</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-208621517">view it on GitHub</a><img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFOep9PuWxNcyB8dQWluVbjKbNKFrks5p2tyLgaJpZM4HsSai.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-208621517"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>