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

Ryan Curtin notifications at github.com
Tue Jun 21 22:56:17 EDT 2016


> @@ -339,12 +340,301 @@ void LSHSearch<SortPolicy>::BaseCase(const size_t queryIndex,
>          referenceIndex, distance);
>  }
>  
> +
> +// Compare class for <double, size_t> pair, used in GetAdditionalProbingBins.
> +class CompareGreater
> +{
> +  public:
> +    bool operator()(
> +        std::pair<double, size_t> p1,
> +        std::pair<double, size_t> p2){
> +      //only compare the double values
> +      return p1.first > p2.first;
> +    }

Are you sure `std::greater` will not work here instead of this class?  By default for `std::pair` that will take into account the second element, but I think that in your case ordering based on the second element doesn't really matter.

---
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#r67987727
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160621/3e2384fe/attachment.html>


More information about the mlpack-git mailing list