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

Ryan Curtin notifications at github.com
Mon Jun 27 15:23:37 EDT 2016


> +      maxPos = i;
> +
> +  if ( maxPos + 1 < A.size()) // otherwise, this is an invalid vector
> +  {
> +    A[maxPos+1] = 1;
> +    return true;
> +  }
> +  return false;
> +
> +}
> +
> +// 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<bool>& A,
> +                              const size_t numProj)

Another small comment---we should name this function `PerturbationValid` (and the others should have a capital first letter too).  It might make more sense to put them inside of the `LSH` class just for the sake of organization, but whatever you want to do there is fine.

---
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/e2596c5ac626fe6264d89ec4d546506228e16d56#r68639460
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160627/7668ed4a/attachment.html>


More information about the mlpack-git mailing list