O
- the type of objects to compute the distances in betweenD
- the type of Distance usedpublic abstract class AbstractPrimitiveDistanceFunction<O,D extends Distance<D>> extends Object implements PrimitiveDistanceFunction<O,D>
Constructor and Description |
---|
AbstractPrimitiveDistanceFunction()
Provides an abstract DistanceFunction.
|
Modifier and Type | Method and Description |
---|---|
abstract D |
distance(O o1,
O o2)
Computes the distance between two given DatabaseObjects according to this
distance function.
|
abstract D |
getDistanceFactory()
Method to get the distance functions factory.
|
<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 D distance(O o1, O o2)
PrimitiveDistanceFunction
public abstract D getDistanceFactory()
DistanceFunction
getDistanceFactory
in interface DistanceFunction<O,D extends Distance<D>>
public boolean isSymmetric()
DistanceFunction
isSymmetric
in interface DistanceFunction<O,D extends Distance<D>>
true
when symmetricpublic boolean isMetric()
DistanceFunction
public <T extends O> DistanceQuery<T,D> instantiate(Relation<T> relation)
instantiate
in interface DistanceFunction<O,D extends Distance<D>>
relation
- Representation