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>
distance
Hold the distance function to be used.static OptionID
DISTANCE_FUNCTION_ID
Parameter to indicate the distance function to be used to ascertain the nearest neighbors.protected int
k
Holds the value ofK_ID
.static OptionID
K_ID
Parameter 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.TypeInformation
getInputTypeRestriction()
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:IndexFactory
Sets the database in the distance function of this index (if existing).- Specified by:
instantiate
in 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:IndexFactory
Get the input type restriction used for negotiating the data query.- Specified by:
getInputTypeRestriction
in interfaceIndexFactory<O>
- Returns:
- Type restriction
-
-