<p>In <a href="https://github.com/mlpack/mlpack/pull/732#discussion_r72321126">src/mlpack/methods/fastmks/fastmks_rules.hpp</a>:</p>
<pre style='color:#555'>> + //! Candidate represents a possible candidate point (value, index).
> + typedef std::pair<double, size_t> Candidate;
> +
> + //! Compare two candidates based on the value.
> + struct CandidateCmp {
> + bool operator()(const Candidate& c1, const Candidate& c2)
> + {
> + return c1.first > c2.first;
> + };
> + };
> +
> + //! Use a min heap to represent the list of candidate points.
> + //! We will use a vector and the std functions: push_heap() pop_heap().
> + //! We can not use a priority queue because we need to iterate over all the
> + //! candidates and std::priority_queue doesn't provide that interface.
> + typedef std::vector<Candidate> CandidateList;
</pre>
<p><a href="https://github.com/rcurtin" class="user-mention">@rcurtin</a> Yes, I agree! When updating fastmks's code, I searched in the documentation for a iterable priority queue and I didn't realize boost::heap::priority_queue provides that interface. I have updated the code in <a href="https://github.com/mlpack/mlpack/pull/732/commits/8e1fbf0f413d9cae3a9d88b275afe6d20def2fca" class="commit-link"><tt>8e1fbf0</tt></a><br>
Thanks!</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#r72321126">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AJ4bFLMPtP7yB2eOjzzyWQkblim3hLrEks5qZmGtgaJpZM4JScnZ">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFNV5XklweCA2820Nd-HtCPXeNHR-ks5qZmGtgaJpZM4JScnZ.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#r72321126"></link>
<meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>