<p>Ah hang on, what I wrote is not quite right. The left node holds the centroid point but the right node does not. So we  can leave <code>FirstPointIsCentroid</code> set to false and get a little bit of calculation duplication or we can try to do something crazy and set <code>FirstPointIsCentroid</code> to <code>true</code> for the left children and <code>false</code> for the right children.</p>

<p>But since <code>FirstPointIsCentroid</code> is a static compile time constant, we would need the types of the left and right children to be different. Let me think about how it might be possible to get the desired behavior...</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-231875582">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe/AJ4bFPh7n1fgU17xJy1j24wCgz62vVSNks5qUrmugaJpZM4I_COp">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFF0N-HAPsGNh-rmcjhe5lnBCFumeks5qUrmugaJpZM4I_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-231875582"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>