Package elki.index.preprocessed.knn
Class RandomSampleKNNPreprocessor.Factory<O>
- java.lang.Object
-
- elki.index.preprocessed.knn.AbstractMaterializeKNNPreprocessor.Factory<O>
-
- elki.index.preprocessed.knn.RandomSampleKNNPreprocessor.Factory<O>
-
- Type Parameters:
O
- The object type
- All Implemented Interfaces:
IndexFactory<O>
- Enclosing class:
- RandomSampleKNNPreprocessor<O>
public static class RandomSampleKNNPreprocessor.Factory<O> extends AbstractMaterializeKNNPreprocessor.Factory<O>
The parameterizable factory.- Author:
- Erich Schubert
-
-
Field Summary
Fields Modifier and Type Field Description private RandomFactory
rnd
Random generatorprivate double
share
Relative share of objects to get-
Fields inherited from class elki.index.preprocessed.knn.AbstractMaterializeKNNPreprocessor.Factory
distance, DISTANCE_FUNCTION_ID, k, K_ID
-
-
Constructor Summary
Constructors Constructor Description Factory(int k, Distance<? super O> distance, double share, RandomFactory rnd)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RandomSampleKNNPreprocessor<O>
instantiate(Relation<O> relation)
Sets the database in the distance function of this index (if existing).-
Methods inherited from class elki.index.preprocessed.knn.AbstractMaterializeKNNPreprocessor.Factory
getDistance, getInputTypeRestriction
-
-
-
-
Field Detail
-
share
private final double share
Relative share of objects to get
-
rnd
private final RandomFactory rnd
Random generator
-
-
Constructor Detail
-
Factory
public Factory(int k, Distance<? super O> distance, double share, RandomFactory rnd)
Constructor.- Parameters:
k
- Kdistance
- distance functionshare
- Sample size (relative)rnd
- Random generator
-
-
Method Detail
-
instantiate
public RandomSampleKNNPreprocessor<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>
- Specified by:
instantiate
in classAbstractMaterializeKNNPreprocessor.Factory<O>
- Parameters:
relation
- the relation to index
-
-