
public abstract class AbstractHashFunctionFamily extends Object implements LocalitySensitiveHashFunctionFamily<NumberVector<?>>
| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractHashFunctionFamily.Parameterizer
Parameterization class.
|
| Modifier and Type | Field and Description |
|---|---|
protected int |
k
The number of projections to use for each hash function.
|
protected RandomProjectionFamily |
proj
Projection family to use.
|
protected RandomFactory |
random
Random generator to use.
|
protected double |
width
Width of each bin.
|
| Constructor and Description |
|---|
AbstractHashFunctionFamily(RandomFactory random,
RandomProjectionFamily proj,
double width,
int k)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
ArrayList<? extends LocalitySensitiveHashFunction<? super NumberVector<?>>> |
generateHashFunctions(Relation<? extends NumberVector<?>> relation,
int l)
Generate hash functions for the given relation.
|
TypeInformation |
getInputTypeRestriction()
Get the input type information.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisCompatibleprotected RandomFactory random
protected RandomProjectionFamily proj
protected double width
protected int k
public AbstractHashFunctionFamily(RandomFactory random, RandomProjectionFamily proj, double width, int k)
random - Random generatorproj - Projection familywidth - Bin widthk - Number of projections for each hash function.public ArrayList<? extends LocalitySensitiveHashFunction<? super NumberVector<?>>> generateHashFunctions(Relation<? extends NumberVector<?>> relation, int l)
LocalitySensitiveHashFunctionFamilygenerateHashFunctions in interface LocalitySensitiveHashFunctionFamily<NumberVector<?>>relation - Relation to indexl - number of hash functions per table.public TypeInformation getInputTypeRestriction()
LocalitySensitiveHashFunctionFamilygetInputTypeRestriction in interface LocalitySensitiveHashFunctionFamily<NumberVector<?>>