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

Ryan Curtin notifications at github.com
Mon Jun 27 15:58:36 EDT 2016


> +
> +    // Now, find location of second smallest score and generate one more vector.
> +    // The second perturbation vector still can't comprise of more than one
> +    // change in the bin codes, because of the way perturbation vectors
> +    // are generated: First we create the one with the smallest score (Ao) and
> +    // then we either add 1 extra dimension to it (Ae) or shift it by one (As).
> +    // Since As contains the second smallest score, and Ae contains both the
> +    // smallest and the second smallest, it's obvious that score(Ae) >
> +    // score(As). Therefore the second perturbation vector is ALWAYS the vector
> +    // containing only the second-lowest scoring perturbation.
> +    
> +    double minscore2 = scores[0];
> +    size_t minloc2 = 0;
> +    for (size_t s = 0; s < (2 * numProj); ++s) // here we can't start from 1
> +    {
> +      if ( minscore2 > scores[s] && s != minloc) //second smallest

Extra space after opening parenthesis.

---
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#r68644835
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160627/5f2a404c/attachment-0001.html>


More information about the mlpack-git mailing list