<p>In <a href="https://github.com/mlpack/mlpack/pull/691#discussion_r68730642">src/mlpack/methods/lsh/lsh_search_impl.hpp</a>:</p>
<pre style='color:#555'>> + std::vector<bool> Ai;
> + do
> + {
> + // Get the perturbation set corresponding to the minimum score.
> + Ai = perturbationSets[ minHeap.top().second ];
> + minHeap.pop(); // .top() returns, .pop() removes
> +
> + // Shift operation on Ai (replace max with max+1).
> + std::vector<bool> As = Ai;
> + if ( perturbationShift(As) && perturbationValid(As, numProj) )
> + // Don't add invalid sets.
> + {
> + perturbationSets.push_back(As); // add shifted set to sets
> + minHeap.push(
> + std::make_pair(
> + perturbationScore(As, scores),
</pre>
<p>I always get confused when I have too many nested functions - that's why I space it out. I changed this to</p>
<pre><code>minHeap.push(
std::make_pair(PerturbationScore(As, scores),
perturbationSets.size() - 1)
);
</code></pre>
<p>I think this way it's clear what the two parts of the pair are, but maybe that's just me. I could change it to what you suggested.</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/691/files/71eda99e207a9b91581504e11a9e14d38838bc9f#r68730642">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe/AJ4bFLnHmSdIELlHajmQusFb6kEtJIuLks5qQPLkgaJpZM4IxQW5">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFMgRH_gTPJF5O8wWoKjyYdoBmW2Sks5qQPLkgaJpZM4IxQW5.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/691/files/71eda99e207a9b91581504e11a9e14d38838bc9f#r68730642"></link>
<meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>