de.lmu.ifi.dbs.elki.database.query.similarity
Class AbstractSimilarityQuery<O,D extends Distance<D>>
java.lang.Object
de.lmu.ifi.dbs.elki.database.query.AbstractDataBasedQuery<O>
de.lmu.ifi.dbs.elki.database.query.similarity.AbstractSimilarityQuery<O,D>
- All Implemented Interfaces:
- DatabaseQuery, SimilarityQuery<O,D>
- Direct Known Subclasses:
- AbstractDBIDSimilarityQuery, PrimitiveSimilarityQuery
public abstract class AbstractSimilarityQuery<O,D extends Distance<D>>
- extends AbstractDataBasedQuery<O>
- implements SimilarityQuery<O,D>
A distance query serves as adapter layer for database and primitive
similarity functions.
Method Summary |
abstract D |
similarity(DBID id1,
DBID id2)
Returns the distance between the two objects specified by their object ids. |
abstract D |
similarity(DBID id1,
O o2)
Returns the distance between the two objects specified by their object ids. |
abstract D |
similarity(O o1,
DBID id2)
Returns the distance between the two objects specified by their object ids. |
abstract D |
similarity(O o1,
O o2)
Returns the distance 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 |
AbstractSimilarityQuery
public AbstractSimilarityQuery(Relation<? extends O> relation)
- Constructor.
- Parameters:
relation
- Relation to use.
similarity
public abstract D similarity(DBID id1,
DBID id2)
- Returns the distance 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 distance between the two objects specified by their object ids
similarity
public abstract D similarity(O o1,
DBID id2)
- Returns the distance 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 distance between the two objects specified by their object ids
similarity
public abstract D similarity(DBID id1,
O o2)
- Returns the distance 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 distance between the two objects specified by their object ids
similarity
public abstract D similarity(O o1,
O o2)
- Returns the distance 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 distance between the two objects specified by their object ids