O
- The object typeD
- The distance typepublic static class PartitionApproximationMaterializeKNNPreprocessor.Factory<O,D extends Distance<D>> extends AbstractMaterializeKNNPreprocessor.Factory<O,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
|
static OptionID |
PARTITIONS_ID
Parameter to specify the number of partitions to use for materializing
the kNN.
|
DISTANCE_FUNCTION_ID, distanceFunction, k, K_ID
Constructor and Description |
---|
PartitionApproximationMaterializeKNNPreprocessor.Factory(int k,
DistanceFunction<? super O,D> distanceFunction,
int partitions)
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, getInputTypeRestriction
public static final OptionID PARTITIONS_ID
Key: -partknn.p
int partitions
public PartitionApproximationMaterializeKNNPreprocessor.Factory(int k, DistanceFunction<? super O,D> distanceFunction, int partitions)
k
- kdistanceFunction
- distance functionpartitions
- number of partitionspublic PartitionApproximationMaterializeKNNPreprocessor<O,D> instantiate(Relation<O> relation)
IndexFactory
instantiate
in interface IndexFactory<O,KNNIndex<O>>
instantiate
in class AbstractMaterializeKNNPreprocessor.Factory<O,D extends Distance<D>>
relation
- the relation to index