T
- Object typepublic static class SharedNearestNeighborJaccardDistanceFunction.Instance<T> extends AbstractIndexBasedDistanceFunction.Instance<T,SharedNearestNeighborIndex<T>,DoubleDistance,SharedNearestNeighborJaccardDistanceFunction<T>>
index, parent
relation
HINT_BULK, HINT_EXACT, HINT_HEAVY_USE, HINT_NO_CACHE, HINT_OPTIMIZED_ONLY, HINT_SINGLE
Constructor and Description |
---|
SharedNearestNeighborJaccardDistanceFunction.Instance(Relation<T> database,
SharedNearestNeighborIndex<T> preprocessor,
SharedNearestNeighborJaccardDistanceFunction<T> parent)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
DoubleDistance |
distance(DBID id1,
DBID id2)
Returns the distance between the two objects specified by their object ids.
|
DoubleDistance |
getDistanceFactory()
Method to get the distance functions factory.
|
protected static double |
jaccardCoefficient(TreeSetDBIDs neighbors1,
TreeSetDBIDs neighbors2) |
getDistanceFunction, getIndex
distance, distance, distance
infiniteDistance, nullDistance, undefinedDistance
getRelation
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
distance, distance, distance, getRelation, infiniteDistance, nullDistance, undefinedDistance
public SharedNearestNeighborJaccardDistanceFunction.Instance(Relation<T> database, SharedNearestNeighborIndex<T> preprocessor, SharedNearestNeighborJaccardDistanceFunction<T> parent)
database
- Databasepreprocessor
- Preprocessorparent
- Parent distanceprotected static double jaccardCoefficient(TreeSetDBIDs neighbors1, TreeSetDBIDs neighbors2)
public DoubleDistance distance(DBID id1, DBID id2)
AbstractDistanceQuery
distance
in interface DistanceQuery<T,DoubleDistance>
distance
in class AbstractDistanceQuery<T,DoubleDistance>
id1
- first object idid2
- second object idpublic DoubleDistance getDistanceFactory()
DistanceQuery
getDistanceFactory
in interface DistanceQuery<T,DoubleDistance>
getDistanceFactory
in class AbstractDistanceQuery<T,DoubleDistance>