[mlpack-git] [mlpack/mlpack] Heaps for mlpack! (#732)
MarcosPividori
notifications at github.com
Tue Jul 26 14:17:04 EDT 2016
> +
> +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());
Ok, I agree. It will be clearer.
---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/mlpack/mlpack/pull/732/files/b93ee86eafb123e29830edd1876c794dc41c7878#r72306704
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160726/20cb5fbd/attachment.html>
More information about the mlpack-git
mailing list