apply
public long apply(org.apache.commons.math.linear.RealVector vector)
Compute the aggregated hash of a vector. This is done by taking the output of the k hashes as a
vector and computing the dot product with a vector of uniformly distributed components between 0 and 10.
So, consider a_{0,k} such that a_i ~ U(0,10) and hash functions h_{0,k} treated as 2 k-dimensional vectors,
we return the dot product of h(v) and a.
- Specified by:
apply
in class LSH
- Parameters:
vector
- A vector to be hashed
- Returns:
- A hash which collides with vectors close according to some metric (implementation dependent).