de.lmu.ifi.dbs.elki.database.query.distance
Class PrimitiveDistanceSimilarityQuery<O,D extends Distance<D>>
java.lang.Object
de.lmu.ifi.dbs.elki.database.query.AbstractDataBasedQuery<O>
de.lmu.ifi.dbs.elki.database.query.distance.AbstractDistanceQuery<O,D>
de.lmu.ifi.dbs.elki.database.query.distance.PrimitiveDistanceQuery<O,D>
de.lmu.ifi.dbs.elki.database.query.distance.PrimitiveDistanceSimilarityQuery<O,D>
- Type Parameters:
O
- Object typeD
- Distance type
- All Implemented Interfaces:
- DatabaseQuery, DistanceQuery<O,D>, DistanceSimilarityQuery<O,D>, SimilarityQuery<O,D>
public class PrimitiveDistanceSimilarityQuery<O,D extends Distance<D>>
- extends PrimitiveDistanceQuery<O,D>
- implements DistanceSimilarityQuery<O,D>
Combination query class, for convenience.
Method Summary |
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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
similarityFunction
private PrimitiveSimilarityFunction<? super O,D extends Distance<D>> similarityFunction
- Typed reference to the similarity function (usually the same as the
distance function!)
PrimitiveDistanceSimilarityQuery
public PrimitiveDistanceSimilarityQuery(Relation<? extends O> relation,
PrimitiveDistanceFunction<? super O,D> distanceFunction,
PrimitiveSimilarityFunction<? super O,D> similarityFunction)
- Constructor.
- Parameters:
relation
- RepresentationdistanceFunction
- distance functionsimilarityFunction
- similarity function (usually the same as the
distance function!)
similarity
public D similarity(DBID id1,
DBID id2)
- Description copied from interface:
SimilarityQuery
- Returns the similarity between the two objects specified by their object
ids.
- Specified by:
similarity
in interface SimilarityQuery<O,D extends Distance<D>>
- Parameters:
id1
- first object idid2
- second object id
- Returns:
- the similarity between the two objects specified by their object
ids
similarity
public D similarity(O o1,
DBID id2)
- Description copied from interface:
SimilarityQuery
- Returns the similarity between the two objects specified by their object
ids.
- Specified by:
similarity
in interface SimilarityQuery<O,D extends Distance<D>>
- Parameters:
o1
- first objectid2
- second object id
- Returns:
- the similarity between the two objects specified by their object
ids
similarity
public D similarity(DBID id1,
O o2)
- Description copied from interface:
SimilarityQuery
- Returns the similarity between the two objects specified by their object
ids.
- Specified by:
similarity
in interface SimilarityQuery<O,D extends Distance<D>>
- Parameters:
id1
- first object ido2
- second object
- Returns:
- the similarity between the two objects specified by their object
ids
similarity
public D similarity(O o1,
O o2)
- Description copied from interface:
SimilarityQuery
- Returns the similarity between the two objects specified by their object
ids.
- Specified by:
similarity
in interface SimilarityQuery<O,D extends Distance<D>>
- Parameters:
o1
- first objecto2
- second object
- Returns:
- the similarity between the two objects specified by their object
ids