<p>In <a href="https://github.com/mlpack/mlpack/pull/732#discussion_r72306156">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>Do you think it would be better to use a <code>boost::priority_queue</code> here?  We use it in the <code>CosineTree</code> code for this exact reason.<br>
<a href="http://www.boost.org/doc/libs/1_55_0/doc/html/heap.html">http://www.boost.org/doc/libs/1_55_0/doc/html/heap.html</a></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#r72306156">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AJ4bFJ5XlF0Lqrm0LrYuJT1vxnIqMXZaks5qZk5tgaJpZM4JScnZ">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFOZ0WwFewO6X6HdtX1z7O9kA1Uudks5qZk5tgaJpZM4JScnZ.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#r72306156"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>