@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://doi.org/10.1145/509907.509965", bibkey="DBLP:conf/stoc/Charikar02") public class CosineLocalitySensitiveHashFunction extends java.lang.Object implements LocalitySensitiveHashFunction<NumberVector>
Reference:
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)
LocalitySensitiveHashFunction
hashObject
in interface LocalitySensitiveHashFunction<NumberVector>
obj
- Object to hashpublic int hashObject(NumberVector obj, double[] buf)
LocalitySensitiveHashFunction
hashObject
in interface LocalitySensitiveHashFunction<NumberVector>
obj
- Object to hashbuf
- Buffer, sized according to the number of projections.public int getNumberOfProjections()
LocalitySensitiveHashFunction
getNumberOfProjections
in interface LocalitySensitiveHashFunction<NumberVector>
Copyright © 2019 ELKI Development Team. License information.