Package elki.index.lsh.hashfunctions
Interface LocalitySensitiveHashFunction<V>
-
- Type Parameters:
V
- Data type to hash.
- All Known Implementing Classes:
CosineLocalitySensitiveHashFunction
,MultipleProjectionsLocalitySensitiveHashFunction
public interface LocalitySensitiveHashFunction<V>
Hash functions as used by locality sensitive hashing.- Since:
- 0.6.0
- Author:
- Erich Schubert
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
getNumberOfProjections()
Get the number of projections performed.int
hashObject(V obj)
Compute the hash value of an object.int
hashObject(V obj, double[] buf)
Compute the hash value of an object (faster version).
-
-
-
Method Detail
-
hashObject
int hashObject(V obj)
Compute the hash value of an object.- Parameters:
obj
- Object to hash- Returns:
- Hash value
-
hashObject
int hashObject(V obj, double[] buf)
Compute the hash value of an object (faster version).- Parameters:
obj
- Object to hashbuf
- Buffer, sized according to the number of projections.- Returns:
- Hash value
-
getNumberOfProjections
int getNumberOfProjections()
Get the number of projections performed.- Returns:
- Number of projections.
-
-