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

Ryan Curtin notifications at github.com
Tue Jun 21 22:51:13 EDT 2016


> +
> +
> +  // define a priority queue with CompareGreater as a minheap
> +  std::priority_queue<
> +    std::pair<double, size_t>,        // contents: pairs of (score, index)
> +    std::vector<                      // container: vector of pairs
> +      std::pair<double, size_t>
> +      >,
> +    mlpack::neighbor::CompareGreater // comparator of pairs(compare scores)
> +  > minHeap; // our minheap
> +
> +  // Start by adding the lowest scoring set to the minheap
> +  std::pair<double, size_t> pair0( perturbationScore(Ao, scores), 0 );
> +  minHeap.push(pair0);
> +
> +  double prevScore = 0; // store score of smallest inserted vector (for assert)

If this variable is here just for an assert, then I think once the tests show the algorithm is working then we can remove this.

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


More information about the mlpack-git mailing list