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

Yannis Mentekidis notifications at github.com
Wed Jun 22 11:12:21 EDT 2016


> +  for (size_t i = 1; i < A.size(); ++i)
> +    if (A[i] > max)
> +      max = A[i];
> +  A.push_back(max+1);
> +}
> +
> +// 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<size_t> &A,
> +    const size_t numProj)
> +{
> +  // Stack allocation and initialization to 0 (bool check[numProj] = {0}) made
> +  // some compilers complain. We use new just to be safe.
> +  bool *check = new bool[numProj]();

Done. I think what you said makes more sense.

---
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/fa7f62da6a4cfe7fa45e297d7a4a1491c9c39bb1#r68071546
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160622/ab68a068/attachment.html>


More information about the mlpack-git mailing list