<p>In <a href="https://github.com/mlpack/mlpack/pull/691#discussion_r68639241">src/mlpack/methods/lsh/lsh_search_impl.hpp</a>:</p>
<pre style='color:#555'>> +}
> +
> +// Inline function used by GetAdditionalProbingBins. The vector shift operation
> +// replaces the largest element of a vector A with (largest element) + 1.
> +inline void perturbationShift(std::vector<size_t> &A)
> +{
> + size_t max_pos = 0;
> + size_t max = A[0];
> + for (size_t i = 1; i < A.size(); ++i)
> + {
> + if (A[i] > max)
> + {
> + max = A[i];
> + max_pos = i;
> + }
> + }
</pre>
<p>I'd just pick <code>std::vector<bool></code>, since that will pack things the same way <code>bitset</code> would, but does not have the same compile-time length requirement.</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/fa7f62da6a4cfe7fa45e297d7a4a1491c9c39bb1#r68639241">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe/AJ4bFMGtkAleu6lHOTy9pGrZYB_QAWySks5qQCLfgaJpZM4IxQW5">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFOZp9nk30FNVo8OJG_IUBFmPE7_9ks5qQCLfgaJpZM4IxQW5.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#r68639241"></link>
<meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>