O
- Object typepublic class SpatialPrimitiveDistanceSimilarityQuery<O extends SpatialComparable> extends SpatialPrimitiveDistanceQuery<O> implements DistanceSimilarityQuery<O>
Modifier and Type | Field and Description |
---|---|
private PrimitiveSimilarityFunction<? super O> |
similarityFunction
Typed reference to the similarity function (usually the same as the
distance function!)
|
distanceFunction
relation
HINT_BULK, HINT_EXACT, HINT_HEAVY_USE, HINT_NO_CACHE, HINT_OPTIMIZED_ONLY, HINT_SINGLE
Constructor and Description |
---|
SpatialPrimitiveDistanceSimilarityQuery(Relation<? extends O> relation,
SpatialPrimitiveDistanceFunction<? super O> distanceFunction,
PrimitiveSimilarityFunction<? super O> similarityFunction)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
PrimitiveSimilarityFunction<? super O> |
getSimilarityFunction()
Get the inner similarity function.
|
double |
similarity(DBIDRef id1,
DBIDRef id2)
Returns the similarity between the two objects specified by their object
ids.
|
double |
similarity(DBIDRef id1,
O o2)
Returns the similarity between the two objects specified by their object
ids.
|
double |
similarity(O o1,
DBIDRef id2)
Returns the similarity between the two objects specified by their object
ids.
|
double |
similarity(O o1,
O o2)
Returns the similarity between the two objects specified by their object
ids.
|
getDistanceFunction, minDist, minDist
distance, distance, distance, distance, getRelation
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
distance, distance, distance, distance, getDistanceFunction, getRelation
getRelation
private PrimitiveSimilarityFunction<? super O extends SpatialComparable> similarityFunction
public SpatialPrimitiveDistanceSimilarityQuery(Relation<? extends O> relation, SpatialPrimitiveDistanceFunction<? super O> distanceFunction, PrimitiveSimilarityFunction<? super O> similarityFunction)
relation
- RepresentationdistanceFunction
- distance functionsimilarityFunction
- similarity function (usually the same as the
distance function!)public final double similarity(DBIDRef id1, DBIDRef id2)
SimilarityQuery
similarity
in interface SimilarityQuery<O extends SpatialComparable>
id1
- first object idid2
- second object idpublic final double similarity(O o1, DBIDRef id2)
SimilarityQuery
similarity
in interface SimilarityQuery<O extends SpatialComparable>
o1
- first objectid2
- second object idpublic final double similarity(DBIDRef id1, O o2)
SimilarityQuery
similarity
in interface SimilarityQuery<O extends SpatialComparable>
id1
- first object ido2
- second objectpublic double similarity(O o1, O o2)
SimilarityQuery
similarity
in interface SimilarityQuery<O extends SpatialComparable>
o1
- first objecto2
- second objectpublic PrimitiveSimilarityFunction<? super O> getSimilarityFunction()
SimilarityQuery
getSimilarityFunction
in interface SimilarityQuery<O extends SpatialComparable>
Copyright © 2019 ELKI Development Team. License information.