<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'>> +
> +template<typename KernelType, typename TreeType>
> +void FastMKSRules<KernelType, TreeType>::GetResults(
> + arma::Mat<size_t>& indices,
> + arma::mat& products)
> +{
> + indices.set_size(k, querySet.n_cols);
> + products.set_size(k, querySet.n_cols);
> +
> + for (size_t i = 0; i < querySet.n_cols; i++)
> + {
> + CandidateList& pqueue = candidates[i];
> + typedef typename CandidateList::iterator Iterator;
> +
> + for (Iterator end = pqueue.end(); end != pqueue.begin(); --end)
> + 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;">—<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>