
O - The object typeD - The distance typepublic abstract static class AbstractMaterializeKNNPreprocessor.Factory<O,D extends Distance<D>,T extends KNNResult<D>> extends Object implements IndexFactory<O,KNNIndex<O>>
| Modifier and Type | Class and Description | 
|---|---|
| static class  | AbstractMaterializeKNNPreprocessor.Factory.Parameterizer<O,D extends Distance<D>>Parameterization class. | 
| Modifier and Type | Field and Description | 
|---|---|
| static OptionID | DISTANCE_FUNCTION_IDParameter to indicate the distance function to be used to ascertain the
 nearest neighbors. | 
| protected DistanceFunction<? super O,D> | distanceFunctionHold the distance function to be used. | 
| protected int | kHolds the value of  K_ID. | 
| static OptionID | K_IDParameter to specify the number of nearest neighbors of an object to be
 materialized. must be an integer greater than 1. | 
| Constructor and Description | 
|---|
| AbstractMaterializeKNNPreprocessor.Factory(int k,
                                          DistanceFunction<? super O,D> distanceFunction)Index factory. | 
| Modifier and Type | Method and Description | 
|---|---|
| D | getDistanceFactory()Get the distance factory. | 
| DistanceFunction<? super O,D> | getDistanceFunction()Get the distance function. | 
| TypeInformation | getInputTypeRestriction()Get the input type restriction used for negotiating the data query. | 
| abstract AbstractMaterializeKNNPreprocessor<O,D,T> | instantiate(Relation<O> relation)Sets the database in the distance function of this index (if existing). | 
public static final OptionID K_ID
 Key: -materialize.k
 
public static final OptionID DISTANCE_FUNCTION_ID
 Default value: EuclideanDistanceFunction
 
 Key: materialize.distance
 
protected int k
K_ID.protected DistanceFunction<? super O,D extends Distance<D>> distanceFunction
public AbstractMaterializeKNNPreprocessor.Factory(int k,
                                          DistanceFunction<? super O,D> distanceFunction)
k - k parameterdistanceFunction - distance functionpublic abstract AbstractMaterializeKNNPreprocessor<O,D,T> instantiate(Relation<O> relation)
IndexFactoryinstantiate in interface IndexFactory<O,KNNIndex<O>>relation - the relation to indexpublic DistanceFunction<? super O,D> getDistanceFunction()
public D getDistanceFactory()
public TypeInformation getInputTypeRestriction()
IndexFactorygetInputTypeRestriction in interface IndexFactory<O,KNNIndex<O>>