<p>I think the second option will lead to enormous duplication of the code. Right now, <code>VantagePointTree</code> has almost the same code as <code>BinarySpaceTree</code>. And if I am not mistaken we have to add the third similar class in order to implement that.</p>

<p>I guess it is better to add a method in each <code>TreeType</code>: <code>IsFirstPointCentroid()</code>. That should not lead to any slowdown since this check is used rarely. (There are two options: we can implement this method in the class definition, so the method will be inlined or we can add two tree traits <code>AllFirstPointsAreCentroids</code> and <code>SomeFirstPointsAreCentroids</code> and invoke this method when it is needed. I think the first option is better.)</p>

<p>Maybe the fourth option is better. We can try to implement the third approach and test performance in order to choose between the third and the fourth options.</p>

<p>So, I guess we should choose either the third or the fourth option.</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/708#issuecomment-232144887">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe/AJ4bFGIJG5CgyCA4ihT7cO1AxLKxPXnyks5qU-OSgaJpZM4I_COp">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFNnBrYx7eI2SxCJHAH2TSMtkflEEks5qU-OSgaJpZM4I_COp.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/708#issuecomment-232144887"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>