[mlpack-git] [mlpack/mlpack] Implementation of Multiprobe LSH (#691)

Ryan Curtin notifications at github.com
Mon Jun 27 16:04:48 EDT 2016


> -  arma::rowvec hashVec = secondHashWeights.t() * arma::floor(allProjInTables);
> +    queryCodesNotFloored.unsafe_col(i) = projections.slice(i).t() * queryPoint;
> +  queryCodesNotFloored += offsets.cols(0, numTablesToSearch - 1);
> +  allProjInTables = arma::floor(queryCodesNotFloored/hashWidth);
> +
> +
> +  // Use hashMat to store the primary probing codes and any additional codes
> +  // from multiprobe LSH.
> +  arma::Mat<size_t> hashMat;
> +  hashMat.set_size(T + 1, numTablesToSearch);
> +
> +  // Compute the primary hash value of each key of the query into a bucket of
> +  // the secondHashTable using the secondHashWeights.
> +  hashMat.row(0) = 
> +    arma::conv_to< arma::Row<size_t> >:: // floor by typecasting to size_t
> +    from( secondHashWeights.t() * allProjInTables );

I think this could fit a bit more concisely on one (or probably two) lines; there's no need for the spaces between the `<>` and there are extra spaces after `from(` and before the closing `);`.

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/mlpack/mlpack/pull/691/files/71eda99e207a9b91581504e11a9e14d38838bc9f#r68645742
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160627/efd0c4b3/attachment-0001.html>


More information about the mlpack-git mailing list