<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'>&gt; +  //! Candidate represents a possible candidate point (value, index).
&gt; +  typedef std::pair&lt;double, size_t&gt; Candidate;
&gt; +
&gt; +  //! Compare two candidates based on the value.
&gt; +  struct CandidateCmp {
&gt; +    bool operator()(const Candidate&amp; c1, const Candidate&amp; c2)
&gt; +    {
&gt; +      return c1.first &gt; c2.first;
&gt; +    };
&gt; +  };
&gt; +
&gt; +  //! Use a min heap to represent the list of candidate points.
&gt; +  //! We will use a vector and the std functions: push_heap() pop_heap().
&gt; +  //! We can not use a priority queue because we need to iterate over all the
&gt; +  //! candidates and std::priority_queue doesn&#39;t provide that interface.
&gt; +  typedef std::vector&lt;Candidate&gt; 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;">&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#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>