de.lmu.ifi.dbs.elki.distance.distancefunction
Class SharedNearestNeighborJaccardDistanceFunction.Instance<T>
java.lang.Object
de.lmu.ifi.dbs.elki.database.query.AbstractDataBasedQuery<O>
de.lmu.ifi.dbs.elki.database.query.distance.AbstractDistanceQuery<O,D>
de.lmu.ifi.dbs.elki.database.query.distance.AbstractDatabaseDistanceQuery<O,D>
de.lmu.ifi.dbs.elki.distance.distancefunction.AbstractIndexBasedDistanceFunction.Instance<T,SharedNearestNeighborIndex<T>,DoubleDistance,SharedNearestNeighborJaccardDistanceFunction<T>>
de.lmu.ifi.dbs.elki.distance.distancefunction.SharedNearestNeighborJaccardDistanceFunction.Instance<T>
- Type Parameters:
T
- Object type
- All Implemented Interfaces:
- DatabaseQuery, DistanceQuery<T,DoubleDistance>, IndexBasedDistanceFunction.Instance<T,SharedNearestNeighborIndex<T>,DoubleDistance>
- Enclosing class:
- SharedNearestNeighborJaccardDistanceFunction<O>
public static class SharedNearestNeighborJaccardDistanceFunction.Instance<T>
- extends AbstractIndexBasedDistanceFunction.Instance<T,SharedNearestNeighborIndex<T>,DoubleDistance,SharedNearestNeighborJaccardDistanceFunction<T>>
Actual instance for a dataset.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SharedNearestNeighborJaccardDistanceFunction.Instance
public SharedNearestNeighborJaccardDistanceFunction.Instance(Relation<T> database,
SharedNearestNeighborIndex<T> preprocessor,
SharedNearestNeighborJaccardDistanceFunction<T> parent)
- Constructor.
- Parameters:
database
- Databasepreprocessor
- Preprocessorparent
- Parent distance
jaccardCoefficient
protected static double jaccardCoefficient(TreeSetDBIDs neighbors1,
TreeSetDBIDs neighbors2)
distance
public DoubleDistance distance(DBID id1,
DBID id2)
- Description copied from class:
AbstractDistanceQuery
- Returns the distance between the two objects specified by their object ids.
- Specified by:
distance
in interface DistanceQuery<T,DoubleDistance>
- Specified by:
distance
in class AbstractDistanceQuery<T,DoubleDistance>
- Parameters:
id1
- first object idid2
- second object id
- Returns:
- the distance between the two objects specified by their object ids
getDistanceFactory
public DoubleDistance getDistanceFactory()
- Description copied from interface:
DistanceQuery
- Method to get the distance functions factory.
- Specified by:
getDistanceFactory
in interface DistanceQuery<T,DoubleDistance>
- Overrides:
getDistanceFactory
in class AbstractDistanceQuery<T,DoubleDistance>
- Returns:
- Factory for distance objects