
O - The object typeD - The distance typepublic static class PartitionApproximationMaterializeKNNPreprocessor.Factory<O,D extends Distance<D>> extends AbstractMaterializeKNNPreprocessor.Factory<O,D,KNNList<D>>
| Modifier and Type | Class and Description |
|---|---|
static class |
PartitionApproximationMaterializeKNNPreprocessor.Factory.Parameterizer<O,D extends Distance<D>>
Parameterization class.
|
| Modifier and Type | Field and Description |
|---|---|
(package private) int |
partitions
The number of partitions to use
|
private RandomFactory |
rnd
Random generator
|
DISTANCE_FUNCTION_ID, distanceFunction, k, K_ID| Constructor and Description |
|---|
PartitionApproximationMaterializeKNNPreprocessor.Factory(int k,
DistanceFunction<? super O,D> distanceFunction,
int partitions,
RandomFactory rnd)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
PartitionApproximationMaterializeKNNPreprocessor<O,D> |
instantiate(Relation<O> relation)
Sets the database in the distance function of this index (if existing).
|
getDistanceFactory, getDistanceFunction, getInputTypeRestrictionint partitions
private final RandomFactory rnd
public PartitionApproximationMaterializeKNNPreprocessor.Factory(int k,
DistanceFunction<? super O,D> distanceFunction,
int partitions,
RandomFactory rnd)
k - kdistanceFunction - distance functionpartitions - number of partitionsrnd - public PartitionApproximationMaterializeKNNPreprocessor<O,D> instantiate(Relation<O> relation)
IndexFactoryinstantiate in interface IndexFactory<O,KNNIndex<O>>instantiate in class AbstractMaterializeKNNPreprocessor.Factory<O,D extends Distance<D>,KNNList<D extends Distance<D>>>relation - the relation to index