O
- object typepublic class SharedNearestNeighborSimilarityFunction<O> extends AbstractIndexBasedSimilarityFunction<O,SharedNearestNeighborIndex<O>,SetDBIDs,IntegerDistance>
Modifier and Type | Class and Description |
---|---|
static class |
SharedNearestNeighborSimilarityFunction.Instance<O>
Instance for a particular database.
|
static class |
SharedNearestNeighborSimilarityFunction.Parameterizer<O>
Parameterization class.
|
INDEX_ID, indexFactory
Constructor and Description |
---|
SharedNearestNeighborSimilarityFunction(SharedNearestNeighborIndex.Factory<O,SharedNearestNeighborIndex<O>> indexFactory)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected static int |
countSharedNeighbors(SetDBIDs neighbors1,
SetDBIDs neighbors2) |
IntegerDistance |
getDistanceFactory()
Get a distance factory.
|
<T extends O> |
instantiate(Relation<T> database)
Preprocess the database to get the actual distance function.
|
getInputTypeRestriction, isSymmetric
public SharedNearestNeighborSimilarityFunction(SharedNearestNeighborIndex.Factory<O,SharedNearestNeighborIndex<O>> indexFactory)
indexFactory
- Index factory.public IntegerDistance getDistanceFactory()
SimilarityFunction
protected static int countSharedNeighbors(SetDBIDs neighbors1, SetDBIDs neighbors2)
public <T extends O> SharedNearestNeighborSimilarityFunction.Instance<T> instantiate(Relation<T> database)
IndexBasedSimilarityFunction
instantiate
in interface IndexBasedSimilarityFunction<O,IntegerDistance>
instantiate
in interface SimilarityFunction<O,IntegerDistance>
instantiate
in class AbstractIndexBasedSimilarityFunction<O,SharedNearestNeighborIndex<O>,SetDBIDs,IntegerDistance>
database
- Representation to use