Package elki.index.preprocessed.knn
Class AbstractMaterializeKNNPreprocessor.Factory<O>
- java.lang.Object
-
- elki.index.preprocessed.knn.AbstractMaterializeKNNPreprocessor.Factory<O>
-
- Type Parameters:
O- The object type
- All Implemented Interfaces:
IndexFactory<O>
- Direct Known Subclasses:
CachedDoubleDistanceKNNPreprocessor.Factory,KNNJoinMaterializeKNNPreprocessor.Factory,MaterializeKNNPreprocessor.Factory,MetricalIndexApproximationMaterializeKNNPreprocessor.Factory,NNDescent.Factory,PartitionApproximationMaterializeKNNPreprocessor.Factory,RandomSampleKNNPreprocessor.Factory,SpacefillingMaterializeKNNPreprocessor.Factory,SpatialApproximationMaterializeKNNPreprocessor.Factory
- Enclosing class:
- AbstractMaterializeKNNPreprocessor<O>
public abstract static class AbstractMaterializeKNNPreprocessor.Factory<O> extends java.lang.Object implements IndexFactory<O>
The parameterizable factory.- Author:
- Erich Schubert
-
-
Field Summary
Fields Modifier and Type Field Description protected Distance<? super O>distanceHold the distance function to be used.static OptionIDDISTANCE_FUNCTION_IDParameter to indicate the distance function to be used to ascertain the nearest neighbors.protected intkHolds the value ofK_ID.static OptionIDK_IDParameter to specify the number of nearest neighbors of an object to be materialized. must be an integer greater than 1.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Distance<? super O>getDistance()Get the distance function.TypeInformationgetInputTypeRestriction()Get the input type restriction used for negotiating the data query.abstract AbstractMaterializeKNNPreprocessor<O>instantiate(Relation<O> relation)Sets the database in the distance function of this index (if existing).
-
-
-
Field Detail
-
K_ID
public static final OptionID K_ID
Parameter to specify the number of nearest neighbors of an object to be materialized. must be an integer greater than 1.
-
DISTANCE_FUNCTION_ID
public static final OptionID DISTANCE_FUNCTION_ID
Parameter to indicate the distance function to be used to ascertain the nearest neighbors.
-
k
protected int k
Holds the value ofK_ID.
-
-
Method Detail
-
instantiate
public abstract AbstractMaterializeKNNPreprocessor<O> instantiate(Relation<O> relation)
Description copied from interface:IndexFactorySets the database in the distance function of this index (if existing).- Specified by:
instantiatein interfaceIndexFactory<O>- Parameters:
relation- the relation to index
-
getDistance
public Distance<? super O> getDistance()
Get the distance function.- Returns:
- Distance function
-
getInputTypeRestriction
public TypeInformation getInputTypeRestriction()
Description copied from interface:IndexFactoryGet the input type restriction used for negotiating the data query.- Specified by:
getInputTypeRestrictionin interfaceIndexFactory<O>- Returns:
- Type restriction
-
-