Package elki.index.preprocessed.snn
Class SharedNearestNeighborPreprocessor.Factory<O>
- java.lang.Object
-
- elki.index.preprocessed.snn.SharedNearestNeighborPreprocessor.Factory<O>
-
- All Implemented Interfaces:
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 OptionIDDISTANCE_FUNCTION_IDParameter to indicate the distance function to be used to ascertain the nearest neighbors.protected Distance<O>distanceFunctionHold the distance function to be used.static 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 TypeInformationgetInputTypeRestriction()Get the input type restriction used for negotiating the data query.intgetNumberOfNeighbors()Get the number of neighborsSharedNearestNeighborPreprocessor<O>instantiate(Relation<O> relation)Instantiate the index for a given database.
-
-
-
Field Detail
-
NUMBER_OF_NEIGHBORS_ID
public static final 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 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.
-
-
Method Detail
-
instantiate
public SharedNearestNeighborPreprocessor<O> instantiate(Relation<O> relation)
Description copied from interface:SharedNearestNeighborIndex.FactoryInstantiate the index for a given database.- Specified by:
instantiatein interfaceIndexFactory<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 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
-
-