<p>In <a href="https://github.com/mlpack/mlpack/pull/708#discussion_r71804116">src/mlpack/core/tree/rectangle_tree/rectangle_tree.hpp</a>:</p>
<pre style='color:#555'>&gt; @@ -492,6 +492,10 @@ class RectangleTree
&gt;    //! Returns false: this tree type does not have self children.
&gt;    static bool HasSelfChildren() { return false; }
&gt;  
&gt; +  //! Returns false: The first point of this node is not the centroid
&gt; +  //! of its bound.
&gt; +  static constexpr bool IsFirstPointCentroid() { return false; }
</pre>
<p>The idea I had here for <code>IsFirstPointCentroid()</code> was to leave it a part of <code>TreeTraits</code>, but just to make it a function:</p>

<pre><code>template&lt;typename TreeType&gt;
struct TreeTraits
{
  static constexpr bool FirstPointIsCentroid(TreeType*) { return false; }
  ...
}
</code></pre>

<p>and then for the VP tree we can specialize and make it non-constexpr:</p>

<pre><code>template&lt;&gt;
struct TreeTraits&lt;VPTree&gt;
{
  static bool FirstPointIsCentroid(VPTree* v) { ... }
}
</code></pre>

<p>It changes the syntax of all of the traits, but it keeps them out of the definition of each tree itself, and we are guaranteed that there is a value for these even if the person who wrote the tree did not specify them.  Does that seem reasonable to you?</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/files/300882ac96e7a663e3e303ca0c45c14c6fafe1a6#r71804116">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AJ4bFB_F4nCIYtPNw4DnSbOqOExVMkPdks5qX_0ogaJpZM4I_COp">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFFTCnbuBXmV88sc4Ww4LrXnIkBhLks5qX_0ogaJpZM4I_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/files/300882ac96e7a663e3e303ca0c45c14c6fafe1a6#r71804116"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>