public abstract class LSHCreator
extends java.lang.Object
| Constructor and Description |
|---|
LSHCreator(int dim,
int numHashes,
int numInternalRepetitions,
long seed)
Create a LSHCreator
|
| Modifier and Type | Method and Description |
|---|---|
LSHFamily |
constructFamily(org.apache.commons.math.random.RandomGenerator rg) |
protected abstract LSH |
constructLSH(org.apache.commons.math.random.RandomGenerator rg) |
org.apache.commons.math.random.RandomGenerator |
createGenerator() |
int |
getDim() |
int |
getNumHashes() |
int |
getNumInternalRepetitions()
Each locality sensitive hash is a composite of numInternalRepetitions LSHes (this is done to increase range of the LSH)
|
public LSHCreator(int dim,
int numHashes,
int numInternalRepetitions,
long seed)
dim - The dimension of the vectors which the LSH will hashnumHashes - The number of locality sensitive hashes to createnumInternalRepetitions - Each locality sensitive hash is a composite of numInternalRepetitions LSHes (this is done to increase range of the LSH)seed - The seed to useprotected abstract LSH constructLSH(org.apache.commons.math.random.RandomGenerator rg) throws org.apache.commons.math.MathException
org.apache.commons.math.MathExceptionpublic int getDim()
public org.apache.commons.math.random.RandomGenerator createGenerator()
public int getNumHashes()
public int getNumInternalRepetitions()
public LSHFamily constructFamily(org.apache.commons.math.random.RandomGenerator rg) throws org.apache.commons.math.MathException
rg - The random generator to use when constructing the familyorg.apache.commons.math.MathException - MathException