Package smile.neighbor
Class MutableLSH<E>
java.lang.Object
smile.neighbor.LSH<E>
smile.neighbor.MutableLSH<E>
- Type Parameters:
E
- the type of data objects in the hash table.
- All Implemented Interfaces:
Serializable
,KNNSearch<double[],
,E> RNNSearch<double[],
E>
Mutable LSH.
- See Also:
-
Constructor Details
-
MutableLSH
public MutableLSH(int d, int L, int k, double w) Constructor.- Parameters:
d
- the dimensionality of data.L
- the number of hash tables.k
- the number of random projection hash functions, which is usually set to log(N) where N is the dataset size.w
- the width of random projections. It should be sufficiently away from 0. But we should not choose a w value that is too large, which will increase the query time.
-
-
Method Details
-
put
Description copied from class:LSH
Insert an item into the hash table. -
remove
Remove an entry from the hash table.- Parameters:
key
- the key.value
- the value.
-
update
Update an entry with new key. Note that the new key and old key should not be the same object.- Parameters:
key
- the key.value
- the value.
-
keys
Returns the keys.- Returns:
- the keys.
-
values
Returns the values.- Returns:
- the values.
-