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

Ryan Curtin notifications at github.com
Tue Jun 28 16:52:20 EDT 2016


> +    std::vector<bool> Ai;
> +    do
> +    {
> +      // Get the perturbation set corresponding to the minimum score.
> +      Ai = perturbationSets[ minHeap.top().second ];
> +      minHeap.pop(); // .top() returns, .pop() removes
> +
> +      // Shift operation on Ai (replace max with max+1).
> +      std::vector<bool> As = Ai;
> +      if ( perturbationShift(As) && perturbationValid(As, numProj) )
> +        // Don't add invalid sets.
> +      {
> +        perturbationSets.push_back(As); // add shifted set to sets
> +        minHeap.push( 
> +            std::make_pair(
> +              perturbationScore(As, scores), 

Sure, that's fine, but do you think it is not too unclear if you include the final `);` on the third line?  I think there is a lot in the style guide that is maybe not clear, so I am happy to go either way if we can eventually codify what is okay and what is not, so we can update the style guide. :)

---
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#r68840832
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160628/23cf3b86/attachment.html>


More information about the mlpack-git mailing list