<p>In <a href="https://github.com/mlpack/mlpack/pull/721#discussion_r70434380">src/mlpack/core/tree/rectangle_tree/x_tree_split_impl.hpp</a>:</p>
<pre style='color:#555'>&gt;      }
&gt;    }
&gt;  
&gt; -  std::sort(sorted.begin(), sorted.end(), structComp&lt;ElemType&gt;);
&gt; +  std::sort(sorted.begin(), sorted.end(),
&gt; +      [] (const std::pair&lt;ElemType, size_t&gt;&amp; p1,
&gt; +          const std::pair&lt;ElemType, size_t&gt;&amp; p2)
&gt; +      {
&gt; +        return p1.first &lt; p2.first;
&gt; +      });
</pre>
<p>Do you think it would be better to define this comparator function in some header file in the rectangle_tree directory instead of writing the lambda many times?  If not, I'll merge as-is, but it might be a good idea to make the code a bit shorter.</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/721/files/ee2a8a1461a33edd830747dccde117ac2cfb12b7#r70434380">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe/AJ4bFCxKYXWwTB3Dnkb1D73Y0ccFFuIuks5qU5K_gaJpZM4JKXF9">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFKiBi3J9gxEmBDc0cerYG_JRhIgpks5qU5K_gaJpZM4JKXF9.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/721/files/ee2a8a1461a33edd830747dccde117ac2cfb12b7#r70434380"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>