<p>In <a href="https://github.com/mlpack/mlpack/pull/732#discussion_r72305336">src/mlpack/methods/fastmks/fastmks_rules_impl.hpp</a>:</p>
<pre style='color:#555'>&gt; +
&gt; +template&lt;typename KernelType, typename TreeType&gt;
&gt; +void FastMKSRules&lt;KernelType, TreeType&gt;::GetResults(
&gt; +    arma::Mat&lt;size_t&gt;&amp; indices,
&gt; +    arma::mat&amp; products)
&gt; +{
&gt; +  indices.set_size(k, querySet.n_cols);
&gt; +  products.set_size(k, querySet.n_cols);
&gt; +
&gt; +  for (size_t i = 0; i &lt; querySet.n_cols; i++)
&gt; +  {
&gt; +    CandidateList&amp; pqueue = candidates[i];
&gt; +    typedef typename CandidateList::iterator Iterator;
&gt; +
&gt; +    for (Iterator end = pqueue.end(); end != pqueue.begin(); --end)
&gt; +      std::pop_heap(pqueue.begin(), end, CandidateCmp());
</pre>
<p>Would it be better to use <code>sort_heap()</code> here, since we don't need the heap properties anymore?</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/732/files/b93ee86eafb123e29830edd1876c794dc41c7878#r72305336">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AJ4bFIlAXRfUQhnWA5Oo06LHlcRM0O0Lks5qZk16gaJpZM4JScnZ">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFNQ5utuoU1Dkp4Mr20Nu8EZY7nRUks5qZk16gaJpZM4JScnZ.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/732/files/b93ee86eafb123e29830edd1876c794dc41c7878#r72305336"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>