O
- Database object type.D
- Distance result type.public class PrimitiveDistanceQuery<O,D extends Distance<D>> extends AbstractDistanceQuery<O,D>
Modifier and Type | Field and Description |
---|---|
protected PrimitiveDistanceFunction<? super O,D> |
distanceFunction
The distance function we use.
|
relation
HINT_BULK, HINT_EXACT, HINT_HEAVY_USE, HINT_NO_CACHE, HINT_OPTIMIZED_ONLY, HINT_SINGLE
Constructor and Description |
---|
PrimitiveDistanceQuery(Relation<? extends O> relation,
PrimitiveDistanceFunction<? super O,D> distanceFunction)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
D |
distance(DBID id1,
DBID id2)
Returns the distance between the two objects specified by their object ids.
|
D |
distance(DBID id1,
O o2)
Returns the distance between the two objects specified by their object ids.
|
D |
distance(O o1,
DBID id2)
Returns the distance between the two objects specified by their object ids.
|
D |
distance(O o1,
O o2)
Returns the distance between the two objects specified by their object ids.
|
PrimitiveDistanceFunction<? super O,D> |
getDistanceFunction()
Get the inner distance function.
|
getDistanceFactory, infiniteDistance, nullDistance, undefinedDistance
getRelation
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getRelation
protected final PrimitiveDistanceFunction<? super O,D extends Distance<D>> distanceFunction
public PrimitiveDistanceQuery(Relation<? extends O> relation, PrimitiveDistanceFunction<? super O,D> distanceFunction)
relation
- Representation to use.distanceFunction
- Our distance functionpublic D distance(DBID id1, DBID id2)
AbstractDistanceQuery
public D distance(O o1, DBID id2)
AbstractDistanceQuery
public D distance(DBID id1, O o2)
AbstractDistanceQuery
public D distance(O o1, O o2)
AbstractDistanceQuery
public PrimitiveDistanceFunction<? super O,D> getDistanceFunction()
DistanceQuery