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