Package elki.index.preprocessed.snn
Class SharedNearestNeighborPreprocessor.Factory<O>
- java.lang.Object
-
- elki.index.preprocessed.snn.SharedNearestNeighborPreprocessor.Factory<O>
-
- All Implemented Interfaces:
elki.index.IndexFactory<O>,SharedNearestNeighborIndex.Factory<O>
- Enclosing class:
- SharedNearestNeighborPreprocessor<O>
public static class SharedNearestNeighborPreprocessor.Factory<O> extends java.lang.Object implements SharedNearestNeighborIndex.Factory<O>
Factory class- Author:
- Erich Schubert
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSharedNearestNeighborPreprocessor.Factory.Par<O>Parameterization class.
-
Field Summary
Fields Modifier and Type Field Description static elki.utilities.optionhandling.OptionIDDISTANCE_FUNCTION_IDParameter to indicate the distance function to be used to ascertain the nearest neighbors.protected elki.distance.Distance<O>distanceFunctionHold the distance function to be used.static elki.utilities.optionhandling.OptionIDNUMBER_OF_NEIGHBORS_IDParameter to indicate the number of neighbors to be taken into account for the shared-nearest-neighbor similarity.protected intnumberOfNeighborsHolds the number of nearest neighbors to be used.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description elki.data.type.TypeInformationgetInputTypeRestriction()intgetNumberOfNeighbors()Get the number of neighborsSharedNearestNeighborPreprocessor<O>instantiate(elki.database.relation.Relation<O> relation)Instantiate the index for a given database.
-
-
-
Field Detail
-
NUMBER_OF_NEIGHBORS_ID
public static final elki.utilities.optionhandling.OptionID NUMBER_OF_NEIGHBORS_ID
Parameter to indicate the number of neighbors to be taken into account for the shared-nearest-neighbor similarity.
-
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.
-
numberOfNeighbors
protected int numberOfNeighbors
Holds the number of nearest neighbors to be used.
-
distanceFunction
protected elki.distance.Distance<O> distanceFunction
Hold the distance function to be used.
-
-
Constructor Detail
-
Factory
public Factory(int numberOfNeighbors, elki.distance.Distance<O> distance)Constructor.- Parameters:
numberOfNeighbors- Number of neighborsdistance- Distance function
-
-
Method Detail
-
instantiate
public SharedNearestNeighborPreprocessor<O> instantiate(elki.database.relation.Relation<O> relation)
Description copied from interface:SharedNearestNeighborIndex.FactoryInstantiate the index for a given database.- Specified by:
instantiatein interfaceelki.index.IndexFactory<O>- Specified by:
instantiatein interfaceSharedNearestNeighborIndex.Factory<O>- Parameters:
relation- Database type- Returns:
- Index
-
getNumberOfNeighbors
public int getNumberOfNeighbors()
Get the number of neighbors- Specified by:
getNumberOfNeighborsin interfaceSharedNearestNeighborIndex.Factory<O>- Returns:
- NN size
-
getInputTypeRestriction
public elki.data.type.TypeInformation getInputTypeRestriction()
- Specified by:
getInputTypeRestrictionin interfaceelki.index.IndexFactory<O>
-
-