use of de.lmu.ifi.dbs.elki.index.lsh.hashfunctions.CosineLocalitySensitiveHashFunction in project elki by elki-project.
the class CosineHashFunctionFamily method generateHashFunctions.
@Override
public ArrayList<? extends LocalitySensitiveHashFunction<? super NumberVector>> generateHashFunctions(Relation<? extends NumberVector> relation, int l) {
int dim = RelationUtil.dimensionality(relation);
ArrayList<LocalitySensitiveHashFunction<? super NumberVector>> ps = new ArrayList<>(l);
for (int i = 0; i < l; i++) {
RandomProjectionFamily.Projection projection = proj.generateProjection(dim, k);
ps.add(new CosineLocalitySensitiveHashFunction(projection));
}
return ps;
}
Aggregations