[mlpack-git] [mlpack/mlpack] Implementation of Multiprobe LSH (#691)
Ryan Curtin
notifications at github.com
Mon Jun 27 15:55:55 EDT 2016
> + // Use check to mark dimensions we have seen before in A. If a dimension is
> + // seen twice (or more), A is not a valid perturbation.
> + std::vector<bool> check(numProj);
> +
> + if (A.size() > 2 * numProj)
> + return false; // This should never happen.
> +
> + // Check that we only see each dimension once. If not, vector is not valid.
> + for (size_t i = 0; i < A.size(); ++i)
> + {
> + // Only check dimensions that were included.
> + if (!A[i])
> + continue;
> +
> + // If dimesnion is unseen thus far, mark it as seen.
> + if ( check[i % numProj] == false )
Extra spaces on the inside of the parentheses; we should go with `if (check[i % numProj] == false)`.
---
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#r68644393
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160627/321f25b9/attachment.html>
More information about the mlpack-git
mailing list