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:
elki.index.IndexFactory<O>
- Direct Known Subclasses:
MaterializeKNNPreprocessor.Factory,NNDescent.Factory,PartitionApproximationMaterializeKNNPreprocessor.Factory,RandomSampleKNNPreprocessor.Factory,SpacefillingMaterializeKNNPreprocessor.Factory
- Enclosing class:
- AbstractMaterializeKNNPreprocessor<O>
public abstract static class AbstractMaterializeKNNPreprocessor.Factory<O> extends java.lang.Object implements elki.index.IndexFactory<O>The parameterizable factory.- Author:
- Erich Schubert
-
-
Field Summary
Fields Modifier and Type Field Description protected elki.distance.Distance<? super O>distanceHold the distance function to be used.static elki.utilities.optionhandling.OptionIDDISTANCE_FUNCTION_IDParameter to indicate the distance function to be used to ascertain the nearest neighbors.protected intkHolds the value ofK_ID.static elki.utilities.optionhandling.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 elki.distance.Distance<? super O>getDistance()Get the distance function.elki.data.type.TypeInformationgetInputTypeRestriction()abstract AbstractMaterializeKNNPreprocessor<O>instantiate(elki.database.relation.Relation<O> relation)
-
-
-
Field Detail
-
K_ID
public static final elki.utilities.optionhandling.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 elki.utilities.optionhandling.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.
-
distance
protected elki.distance.Distance<? super O> distance
Hold the distance function to be used.
-
-
Constructor Detail
-
Factory
public Factory(int k, elki.distance.Distance<? super O> distance)Index factory.- Parameters:
k- k parameterdistance- distance function
-
-
Method Detail
-
instantiate
public abstract AbstractMaterializeKNNPreprocessor<O> instantiate(elki.database.relation.Relation<O> relation)
- Specified by:
instantiatein interfaceelki.index.IndexFactory<O>
-
getDistance
public elki.distance.Distance<? super O> getDistance()
Get the distance function.- Returns:
- Distance function
-
getInputTypeRestriction
public elki.data.type.TypeInformation getInputTypeRestriction()
- Specified by:
getInputTypeRestrictionin interfaceelki.index.IndexFactory<O>
-
-