O
- the type of objects to compute the distances in betweenpublic abstract class AbstractPrimitiveDistanceFunction<O> extends Object implements PrimitiveDistanceFunction<O>
Constructor and Description |
---|
AbstractPrimitiveDistanceFunction()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
abstract double |
distance(O o1,
O o2)
Computes the distance between two given DatabaseObjects according to this
distance function.
|
<T extends O> |
instantiate(Relation<T> relation)
Instantiate with a database to get the actual distance query.
|
boolean |
isMetric()
Is this distance function metric (in particular, does it satisfy the
triangle equation?)
|
boolean |
isSymmetric()
Is this function symmetric?
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getInputTypeRestriction
public AbstractPrimitiveDistanceFunction()
public abstract double distance(O o1, O o2)
PrimitiveDistanceFunction
distance
in interface PrimitiveDistanceFunction<O>
o1
- first DatabaseObjecto2
- second DatabaseObjectpublic boolean isSymmetric()
DistanceFunction
isSymmetric
in interface DistanceFunction<O>
true
when symmetricpublic boolean isMetric()
DistanceFunction
isMetric
in interface DistanceFunction<O>
true
when metric.public <T extends O> DistanceQuery<T> instantiate(Relation<T> relation)
instantiate
in interface DistanceFunction<O>
relation
- RepresentationCopyright © 2015 ELKI Development Team, Lehr- und Forschungseinheit für Datenbanksysteme, Ludwig-Maximilians-Universität München. License information.