Package elki.database.query.similarity
Interface SimilarityQuery<O>
-
- Type Parameters:
O- Input object type
- All Known Subinterfaces:
DatabaseSimilarityQuery<O>,DistanceSimilarityQuery<O>,IndexBasedSimilarity.Instance<T,I>
- All Known Implementing Classes:
AbstractIndexBasedSimilarity.Instance,FractionalSharedNearestNeighborSimilarity.Instance,PrecomputedSimilarityMatrix.PrecomputedSimilarityQuery,PrimitiveDistanceSimilarityQuery,PrimitiveSimilarityQuery,SharedNearestNeighborSimilarity.Instance,SpatialPrimitiveDistanceSimilarityQuery
public interface SimilarityQuery<O>A similarity query serves as adapter layer for database and primitive similarity functions.- Since:
- 0.4.0
- Author:
- Erich Schubert
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Relation<? extends O>getRelation()Access the underlying data query.Similarity<? super O>getSimilarity()Get the inner similarity function.doublesimilarity(DBIDRef id1, DBIDRef id2)Returns the similarity between the two objects specified by their object ids.doublesimilarity(DBIDRef id1, O o2)Returns the similarity between the two objects specified by their object ids.doublesimilarity(O o1, DBIDRef id2)Returns the similarity between the two objects specified by their object ids.doublesimilarity(O o1, O o2)Returns the similarity between the two objects specified by their object ids.
-
-
-
Method Detail
-
similarity
double similarity(DBIDRef id1, DBIDRef id2)
Returns the similarity between the two objects specified by their object ids.- Parameters:
id1- first object idid2- second object id- Returns:
- the similarity between the two objects specified by their object ids
-
similarity
double similarity(O o1, DBIDRef id2)
Returns the similarity between the two objects specified by their object ids.- Parameters:
o1- first objectid2- second object id- Returns:
- the similarity between the two objects specified by their object ids
-
similarity
double similarity(DBIDRef id1, O o2)
Returns the similarity between the two objects specified by their object ids.- Parameters:
id1- first object ido2- second object- Returns:
- the similarity between the two objects specified by their object ids
-
similarity
double similarity(O o1, O o2)
Returns the similarity between the two objects specified by their object ids.- Parameters:
o1- first objecto2- second object- Returns:
- the similarity between the two objects specified by their object ids
-
getRelation
Relation<? extends O> getRelation()
Access the underlying data query.- Returns:
- data query in use
-
getSimilarity
Similarity<? super O> getSimilarity()
Get the inner similarity function.- Returns:
- Similarity function
-
-