be.hogent.tarsos.lsh.families
Class EuclideanHash

java.lang.Object
  extended by be.hogent.tarsos.lsh.families.EuclideanHash
All Implemented Interfaces:
HashFunction

public class EuclideanHash
extends java.lang.Object
implements HashFunction


Constructor Summary
EuclideanHash(int dimensions, int w)
           
 
Method Summary
 int hash(Vector vector)
          Hashes a vector of arbitrary dimensions to an integer.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EuclideanHash

public EuclideanHash(int dimensions,
                     int w)
Method Detail

hash

public int hash(Vector vector)
Description copied from interface: HashFunction
Hashes a vector of arbitrary dimensions to an integer. The hash function needs to be locality sensitive to work in the locality sensitive hash (LSH) scheme. Meaning that vectors that are 'close' according to some metric have a high probability to end up with the same hash.

Specified by:
hash in interface HashFunction
Parameters:
vector - The vector to hash. Can have any number of dimensions.
Returns:
A locality sensitive hash (LSH). Vectors that are 'close' according to some metric have a high probability to end up with the same hash.