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

Ryan Curtin notifications at github.com
Mon May 30 17:47:55 EDT 2016


> +
> +
> +// Compute additional probing bins for a query
> +template<typename SortPolicy>
> +void LSHSearch<SortPolicy>::GetAdditionalProbingBins(
> +                            const arma::vec &queryCode,
> +                            const arma::vec &queryCodeNotFloored,
> +                            const size_t T,
> +                            arma::mat &additionalProbingBins) const
> +{
> +
> +  if (T == 0)
> +    return;
> +
> +  // Each column of additionalProbingBins is the code of a bin.
> +  additionalProbingBins.zeros(numProj, T);

.set_size() will avoid the time to set everything to zero, which will be useful here since you are setting the columns in the for loop below this call.

---
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/657/files/2eb6163c90e8e19566784cf960d38d82691221e1#r65107629
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160530/10d41083/attachment.html>


More information about the mlpack-git mailing list