
@Reference(authors="M.S. Charikar", title="Similarity estimation techniques from rounding algorithms", booktitle="Proc. 34th ACM Symposium on Theory of computing, STOC\'02", url="https://dx.doi.org/10.1145/509907.509965") public class CosineLocalitySensitiveHashFunction extends Object implements LocalitySensitiveHashFunction<NumberVector>
M.S. Charikar
Similarity estimation techniques from rounding algorithms
Proc. 34th ACM Symposium on Theory of computing, STOC'02
| Modifier and Type | Field and Description |
|---|---|
private RandomProjectionFamily.Projection |
projection
Projection function.
|
| Constructor and Description |
|---|
CosineLocalitySensitiveHashFunction(RandomProjectionFamily.Projection projection)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getNumberOfProjections()
Get the number of projections performed.
|
int |
hashObject(NumberVector obj)
Compute the hash value of an object.
|
int |
hashObject(NumberVector obj,
double[] buf)
Compute the hash value of an object (faster version).
|
private RandomProjectionFamily.Projection projection
public CosineLocalitySensitiveHashFunction(RandomProjectionFamily.Projection projection)
projection - Projectionpublic int hashObject(NumberVector obj)
LocalitySensitiveHashFunctionhashObject in interface LocalitySensitiveHashFunction<NumberVector>obj - Object to hashpublic int hashObject(NumberVector obj, double[] buf)
LocalitySensitiveHashFunctionhashObject in interface LocalitySensitiveHashFunction<NumberVector>obj - Object to hashbuf - Buffer, sized according to the number of projections.public int getNumberOfProjections()
LocalitySensitiveHashFunctiongetNumberOfProjections in interface LocalitySensitiveHashFunction<NumberVector>Copyright © 2015 ELKI Development Team, Lehr- und Forschungseinheit für Datenbanksysteme, Ludwig-Maximilians-Universität München. License information.