O
- Database object type.public class PrimitiveSimilarityQuery<O> extends AbstractSimilarityQuery<O>
Modifier and Type | Field and Description |
---|---|
protected PrimitiveSimilarityFunction<? super O> |
similarityFunction
The distance function we use.
|
relation
HINT_BULK, HINT_EXACT, HINT_HEAVY_USE, HINT_NO_CACHE, HINT_OPTIMIZED_ONLY, HINT_SINGLE
Constructor and Description |
---|
PrimitiveSimilarityQuery(Relation<? extends O> relation,
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 distance between the two objects specified by their object ids.
|
double |
similarity(DBIDRef id1,
O o2)
Returns the distance between the two objects specified by their object ids.
|
double |
similarity(O o1,
DBIDRef id2)
Returns the distance between the two objects specified by their object ids.
|
double |
similarity(O o1,
O o2)
Returns the distance between the two objects specified by their object ids.
|
getRelation
protected final PrimitiveSimilarityFunction<? super O> similarityFunction
public PrimitiveSimilarityQuery(Relation<? extends O> relation, PrimitiveSimilarityFunction<? super O> similarityFunction)
relation
- Relation to use.similarityFunction
- Our similarity functionpublic double similarity(DBIDRef id1, DBIDRef id2)
AbstractSimilarityQuery
similarity
in interface SimilarityQuery<O>
similarity
in class AbstractSimilarityQuery<O>
id1
- first object idid2
- second object idpublic double similarity(O o1, DBIDRef id2)
AbstractSimilarityQuery
similarity
in interface SimilarityQuery<O>
similarity
in class AbstractSimilarityQuery<O>
o1
- first objectid2
- second object idpublic double similarity(DBIDRef id1, O o2)
AbstractSimilarityQuery
similarity
in interface SimilarityQuery<O>
similarity
in class AbstractSimilarityQuery<O>
id1
- first object ido2
- second objectpublic double similarity(O o1, O o2)
AbstractSimilarityQuery
similarity
in interface SimilarityQuery<O>
similarity
in class AbstractSimilarityQuery<O>
o1
- first objecto2
- second objectpublic PrimitiveSimilarityFunction<? super O> getSimilarityFunction()
SimilarityQuery
Copyright © 2015 ELKI Development Team, Lehr- und Forschungseinheit für Datenbanksysteme, Ludwig-Maximilians-Universität München. License information.