O
- Object typeD
- Distance typepublic class PrimitiveDistanceSimilarityQuery<O,D extends Distance<D>> extends PrimitiveDistanceQuery<O,D> implements DistanceSimilarityQuery<O,D>
Modifier and Type | Field and Description |
---|---|
private PrimitiveSimilarityFunction<? super O,D> |
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 |
---|
PrimitiveDistanceSimilarityQuery(Relation<? extends O> relation,
PrimitiveDistanceFunction<? super O,D> distanceFunction,
PrimitiveSimilarityFunction<? super O,D> similarityFunction)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
D |
similarity(DBID id1,
DBID id2)
Returns the similarity between the two objects specified by their object
ids.
|
D |
similarity(DBID id1,
O o2)
Returns the similarity between the two objects specified by their object
ids.
|
D |
similarity(O o1,
DBID id2)
Returns the similarity between the two objects specified by their object
ids.
|
D |
similarity(O o1,
O o2)
Returns the similarity between the two objects specified by their object
ids.
|
distance, distance, distance, distance, getDistanceFunction
getDistanceFactory, infiniteDistance, nullDistance, undefinedDistance
getRelation
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
distance, distance, distance, distance, getDistanceFactory, getDistanceFunction, getRelation, infiniteDistance, nullDistance, undefinedDistance
getDistanceFactory, getRelation
private PrimitiveSimilarityFunction<? super O,D extends Distance<D>> similarityFunction
public PrimitiveDistanceSimilarityQuery(Relation<? extends O> relation, PrimitiveDistanceFunction<? super O,D> distanceFunction, PrimitiveSimilarityFunction<? super O,D> similarityFunction)
relation
- RepresentationdistanceFunction
- distance functionsimilarityFunction
- similarity function (usually the same as the
distance function!)public D similarity(DBID id1, DBID id2)
SimilarityQuery
similarity
in interface SimilarityQuery<O,D extends Distance<D>>
id1
- first object idid2
- second object idpublic D similarity(O o1, DBID id2)
SimilarityQuery
similarity
in interface SimilarityQuery<O,D extends Distance<D>>
o1
- first objectid2
- second object idpublic D similarity(DBID id1, O o2)
SimilarityQuery
similarity
in interface SimilarityQuery<O,D extends Distance<D>>
id1
- first object ido2
- second objectpublic D similarity(O o1, O o2)
SimilarityQuery
similarity
in interface SimilarityQuery<O,D extends Distance<D>>
o1
- first objecto2
- second object