public class CosineHash extends java.lang.Object implements HashFunction
Constructor and Description |
---|
CosineHash(int dimensions) |
Modifier and Type | Method and Description |
---|---|
int |
hash(Vector vector)
Hashes a vector of arbitrary dimensions to an integer.
|
public int hash(Vector vector)
HashFunction
hash
in interface HashFunction
vector
- The vector to hash. Can have any number of dimensions.