Package elki.index.lsh.hashfamilies
Class AbstractProjectedHashFunctionFamily
- java.lang.Object
-
- elki.index.lsh.hashfamilies.AbstractProjectedHashFunctionFamily
-
- All Implemented Interfaces:
LocalitySensitiveHashFunctionFamily<elki.data.NumberVector>
- Direct Known Subclasses:
EuclideanHashFunctionFamily,ManhattanHashFunctionFamily
public abstract class AbstractProjectedHashFunctionFamily extends java.lang.Object implements LocalitySensitiveHashFunctionFamily<elki.data.NumberVector>
Abstract base class for projection based hash functions.- Since:
- 0.6.0
- Author:
- Erich Schubert
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAbstractProjectedHashFunctionFamily.ParParameterization class.
-
Field Summary
Fields Modifier and Type Field Description protected intkThe number of projections to use for each hash function.protected elki.data.projection.random.RandomProjectionFamilyprojProjection family to use.protected elki.utilities.random.RandomFactoryrandomRandom generator to use.protected doublewidthWidth of each bin.
-
Constructor Summary
Constructors Constructor Description AbstractProjectedHashFunctionFamily(elki.utilities.random.RandomFactory random, elki.data.projection.random.RandomProjectionFamily proj, double width, int k)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.ArrayList<? extends LocalitySensitiveHashFunction<? super elki.data.NumberVector>>generateHashFunctions(elki.database.relation.Relation<? extends elki.data.NumberVector> relation, int l)Generate hash functions for the given relation.elki.data.type.TypeInformationgetInputTypeRestriction()Get the input type information.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface elki.index.lsh.hashfamilies.LocalitySensitiveHashFunctionFamily
isCompatible
-
-
-
-
Field Detail
-
random
protected elki.utilities.random.RandomFactory random
Random generator to use.
-
proj
protected elki.data.projection.random.RandomProjectionFamily proj
Projection family to use.
-
width
protected double width
Width of each bin.
-
k
protected int k
The number of projections to use for each hash function.
-
-
Constructor Detail
-
AbstractProjectedHashFunctionFamily
public AbstractProjectedHashFunctionFamily(elki.utilities.random.RandomFactory random, elki.data.projection.random.RandomProjectionFamily proj, double width, int k)Constructor.- Parameters:
random- Random generatorproj- Projection familywidth- Bin widthk- Number of projections for each hash function.
-
-
Method Detail
-
generateHashFunctions
public java.util.ArrayList<? extends LocalitySensitiveHashFunction<? super elki.data.NumberVector>> generateHashFunctions(elki.database.relation.Relation<? extends elki.data.NumberVector> relation, int l)
Description copied from interface:LocalitySensitiveHashFunctionFamilyGenerate hash functions for the given relation.- Specified by:
generateHashFunctionsin interfaceLocalitySensitiveHashFunctionFamily<elki.data.NumberVector>- Parameters:
relation- Relation to indexl- Number of hash tables to use- Returns:
- Family of hash functions
-
getInputTypeRestriction
public elki.data.type.TypeInformation getInputTypeRestriction()
Description copied from interface:LocalitySensitiveHashFunctionFamilyGet the input type information.- Specified by:
getInputTypeRestrictionin interfaceLocalitySensitiveHashFunctionFamily<elki.data.NumberVector>- Returns:
- Input type information.
-
-