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 class
SharedNearestNeighborPreprocessor.Factory.Par<O>
Parameterization class.
-
Field Summary
Fields Modifier and Type Field Description static OptionID
DISTANCE_FUNCTION_ID
Parameter to indicate the distance function to be used to ascertain the nearest neighbors.protected Distance<O>
distanceFunction
Hold the distance function to be used.static OptionID
NUMBER_OF_NEIGHBORS_ID
Parameter to indicate the number of neighbors to be taken into account for the shared-nearest-neighbor similarity.protected int
numberOfNeighbors
Holds the number of nearest neighbors to be used.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TypeInformation
getInputTypeRestriction()
Get the input type restriction used for negotiating the data query.int
getNumberOfNeighbors()
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.Factory
Instantiate the index for a given database.- Specified by:
instantiate
in interfaceIndexFactory<O>
- Specified by:
instantiate
in interfaceSharedNearestNeighborIndex.Factory<O>
- Parameters:
relation
- Database type- Returns:
- Index
-
getNumberOfNeighbors
public int getNumberOfNeighbors()
Get the number of neighbors- Specified by:
getNumberOfNeighbors
in interfaceSharedNearestNeighborIndex.Factory<O>
- Returns:
- NN size
-
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
-
-