T
- Object typepublic static class FractionalSharedNearestNeighborSimilarityFunction.Instance<T> extends AbstractIndexBasedSimilarityFunction.Instance<T,SharedNearestNeighborIndex<T>,ArrayDBIDs,DoubleDistance>
Modifier and Type | Field and Description |
---|---|
private FractionalSharedNearestNeighborSimilarityFunction<? super T> |
similarityFunction
Similarity function.
|
index
relation
HINT_BULK, HINT_EXACT, HINT_HEAVY_USE, HINT_NO_CACHE, HINT_OPTIMIZED_ONLY, HINT_SINGLE
Constructor and Description |
---|
FractionalSharedNearestNeighborSimilarityFunction.Instance(Relation<T> database,
SharedNearestNeighborIndex<T> preprocessor,
FractionalSharedNearestNeighborSimilarityFunction<? super T> similarityFunction)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected static int |
countSharedNeighbors(DBIDs neighbors1,
DBIDs neighbors2)
Compute the intersection size.
|
DoubleDistance |
getDistanceFactory()
Method to get the distance functions factory.
|
SimilarityFunction<? super T,DoubleDistance> |
getSimilarityFunction()
Get the inner similarity function.
|
DoubleDistance |
similarity(DBIDRef id1,
DBIDRef id2)
Returns the distance between the two objects specified by their object ids.
|
getIndex
similarity, similarity, similarity
getRelation
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getRelation, similarity, similarity, similarity
private FractionalSharedNearestNeighborSimilarityFunction<? super T> similarityFunction
public FractionalSharedNearestNeighborSimilarityFunction.Instance(Relation<T> database, SharedNearestNeighborIndex<T> preprocessor, FractionalSharedNearestNeighborSimilarityFunction<? super T> similarityFunction)
database
- Databasepreprocessor
- Preprocessorprotected static int countSharedNeighbors(DBIDs neighbors1, DBIDs neighbors2)
neighbors1
- SORTED neighbor ids of firstneighbors2
- SORTED neighbor ids of secondpublic DoubleDistance similarity(DBIDRef id1, DBIDRef id2)
AbstractSimilarityQuery
similarity
in interface SimilarityQuery<T,DoubleDistance>
similarity
in class AbstractSimilarityQuery<T,DoubleDistance>
id1
- first object idid2
- second object idpublic SimilarityFunction<? super T,DoubleDistance> getSimilarityFunction()
SimilarityQuery
public DoubleDistance getDistanceFactory()
SimilarityQuery