<p>In <a href="https://github.com/mlpack/mlpack/pull/691#discussion_r68071546">src/mlpack/methods/lsh/lsh_search_impl.hpp</a>:</p>
<pre style='color:#555'>&gt; +  for (size_t i = 1; i &lt; A.size(); ++i)
&gt; +    if (A[i] &gt; max)
&gt; +      max = A[i];
&gt; +  A.push_back(max+1);
&gt; +}
&gt; +
&gt; +// Return true if perturbation set A is valid. A perturbation set is invalid if
&gt; +// it contains two (or more) actions for the same dimension or dimensions that
&gt; +// are larger than the queryCode&#39;s dimensions.
&gt; +inline bool perturbationValid(
&gt; +    const std::vector&lt;size_t&gt; &amp;A,
&gt; +    const size_t numProj)
&gt; +{
&gt; +  // Stack allocation and initialization to 0 (bool check[numProj] = {0}) made
&gt; +  // some compilers complain. We use new just to be safe.
&gt; +  bool *check = new bool[numProj]();
</pre>
<p>Done. I think what you said makes more sense.</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/691/files/fa7f62da6a4cfe7fa45e297d7a4a1491c9c39bb1#r68071546">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe/AJ4bFPHVyUx-jIDUmgmCW5ucgR02caSwks5qOVDVgaJpZM4IxQW5">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFNSth4Zl_pqm69JxjUPjKpZ9jjx1ks5qOVDVgaJpZM4IxQW5.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/fa7f62da6a4cfe7fa45e297d7a4a1491c9c39bb1#r68071546"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>