<p>In <a href="https://github.com/mlpack/mlpack/pull/691#discussion_r68639460">src/mlpack/methods/lsh/lsh_search_impl.hpp</a>:</p>
<pre style='color:#555'>> + maxPos = i;
> +
> + if ( maxPos + 1 < A.size()) // otherwise, this is an invalid vector
> + {
> + A[maxPos+1] = 1;
> + return true;
> + }
> + return false;
> +
> +}
> +
> +// Return true if perturbation set A is valid. A perturbation set is invalid if
> +// it contains two (or more) actions for the same dimension or dimensions that
> +// are larger than the queryCode's dimensions.
> +inline bool perturbationValid(const std::vector<bool>& A,
> + const size_t numProj)
</pre>
<p>Another small comment---we should name this function <code>PerturbationValid</code> (and the others should have a capital first letter too). It might make more sense to put them inside of the <code>LSH</code> class just for the sake of organization, but whatever you want to do there is fine.</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/e2596c5ac626fe6264d89ec4d546506228e16d56#r68639460">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe/AJ4bFBd4mgxAkUUOd-RhZ7xXrvWPa-GOks5qQCM5gaJpZM4IxQW5">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFDY1XoZUl-1RRhzCEoCcWIAVAEGRks5qQCM5gaJpZM4IxQW5.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/e2596c5ac626fe6264d89ec4d546506228e16d56#r68639460"></link>
<meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>