O
- object typeD
- distance typepublic class ProxyDistanceFunction<O,D extends Distance<D>> extends AbstractDBIDDistanceFunction<D>
Modifier and Type | Field and Description |
---|---|
(package private) DistanceQuery<O,D> |
inner
Distance query
|
Constructor and Description |
---|
ProxyDistanceFunction(DistanceQuery<O,D> inner)
Constructor
|
Modifier and Type | Method and Description |
---|---|
D |
distance(DBIDRef o1,
DBIDRef o2)
Returns the distance between the two objects specified by their object ids.
|
boolean |
equals(Object obj) |
D |
getDistanceFactory()
Method to get the distance functions factory.
|
DistanceQuery<O,D> |
getDistanceQuery()
Get the inner query
|
int |
hashCode() |
static <O,D extends Distance<D>> |
proxy(DistanceQuery<O,D> inner)
Static method version.
|
void |
setDistanceQuery(DistanceQuery<O,D> inner) |
static <V,T extends V,D extends Distance<D>> |
unwrapDistance(DistanceFunction<V,D> dfun)
Helper function, to resolve any wrapped Proxy Distances
|
getInputTypeRestriction, instantiate, isMetric, isSymmetric
DistanceQuery<O,D extends Distance<D>> inner
public ProxyDistanceFunction(DistanceQuery<O,D> inner)
inner
- Inner distancepublic static <O,D extends Distance<D>> ProxyDistanceFunction<O,D> proxy(DistanceQuery<O,D> inner)
O
- Object typeD
- Distance typeinner
- Inner distance querypublic D distance(DBIDRef o1, DBIDRef o2)
DBIDDistanceFunction
distance
in interface DBIDDistanceFunction<D extends Distance<D>>
distance
in class AbstractDBIDDistanceFunction<D extends Distance<D>>
o1
- first object ido2
- second object idpublic D getDistanceFactory()
DistanceFunction
getDistanceFactory
in interface DistanceFunction<DBID,D extends Distance<D>>
getDistanceFactory
in class AbstractDBIDDistanceFunction<D extends Distance<D>>
public DistanceQuery<O,D> getDistanceQuery()
public void setDistanceQuery(DistanceQuery<O,D> inner)
inner
- the inner distance query to setpublic static <V,T extends V,D extends Distance<D>> DistanceFunction<? super V,D> unwrapDistance(DistanceFunction<V,D> dfun)
V
- Object typeD
- Distance typedfun
- Distance function to unwrap.