<p>In <a href="https://github.com/mlpack/mlpack/pull/691#discussion_r67985870">src/mlpack/methods/lsh/lsh_search_impl.hpp</a>:</p>
<pre style='color:#555'>&gt;    for (size_t i = 0; i &lt; hashVec.n_elem; i++)
&gt;      hashVec[i] = (double) ((size_t) hashVec[i] % secondHashSize);
&gt;  
&gt;    Log::Assert(hashVec.n_elem == numTablesToSearch);
&gt;  
&gt; +  // Compute hashVectors of additional probing bins
&gt; +  arma::mat hashMat;
</pre>
<p>Two thoughts:</p>

<ul>
<li>couldn't this be an <code>arma::Mat&lt;size_t&gt;</code>?  I'm not sure why the original <code>hashVec</code> didn't hold a <code>size_t</code> internally.</li>
<li>we could probably save a copy and speed things up a little if we never use the original <code>hashVec</code> and instead use <code>hashMat</code> and set its size to <code>(T + 1, numTablesToSearch)</code>.</li>
</ul>

<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#r67985870">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe/AJ4bFL_R1ikPoAfwo2xaQ0u4O2sSdAU1ks5qOJzVgaJpZM4IxQW5">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFCoW0qnMXsbcTU6s34ylM2LxuyFRks5qOJzVgaJpZM4IxQW5.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#r67985870"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>