O
- Database object type.public class PrimitiveSimilarityQuery<O> extends java.lang.Object implements SimilarityQuery<O>
Modifier and Type | Field and Description |
---|---|
protected Relation<? extends O> |
relation
The data to use for this query
|
protected PrimitiveSimilarityFunction<? super O> |
similarityFunction
The distance function we use.
|
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 |
---|---|
Relation<? extends O> |
getRelation()
Access the underlying data query.
|
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.
|
protected final PrimitiveSimilarityFunction<? super O> similarityFunction
public PrimitiveSimilarityQuery(Relation<? extends O> relation, PrimitiveSimilarityFunction<? super O> similarityFunction)
relation
- Relation to use.similarityFunction
- Our similarity functionpublic final double similarity(DBIDRef id1, DBIDRef id2)
SimilarityQuery
similarity
in interface SimilarityQuery<O>
id1
- first object idid2
- second object idpublic final double similarity(O o1, DBIDRef id2)
SimilarityQuery
similarity
in interface SimilarityQuery<O>
o1
- first objectid2
- second object idpublic final double similarity(DBIDRef id1, O o2)
SimilarityQuery
similarity
in interface SimilarityQuery<O>
id1
- first object ido2
- second objectpublic double similarity(O o1, O o2)
SimilarityQuery
similarity
in interface SimilarityQuery<O>
o1
- first objecto2
- second objectpublic Relation<? extends O> getRelation()
SimilarityQuery
getRelation
in interface SimilarityQuery<O>
public PrimitiveSimilarityFunction<? super O> getSimilarityFunction()
SimilarityQuery
getSimilarityFunction
in interface SimilarityQuery<O>
Copyright © 2019 ELKI Development Team. License information.