de.lmu.ifi.dbs.elki.distance.distancefunction
Class SharedNearestNeighborJaccardDistanceFunction<O>

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.distance.distancefunction.AbstractDatabaseDistanceFunction<O,D>
      extended by de.lmu.ifi.dbs.elki.distance.distancefunction.AbstractIndexBasedDistanceFunction<O,SharedNearestNeighborIndex<O>,DoubleDistance>
          extended by de.lmu.ifi.dbs.elki.distance.distancefunction.SharedNearestNeighborJaccardDistanceFunction<O>
Type Parameters:
O - object type
All Implemented Interfaces:
DistanceFunction<O,DoubleDistance>, IndexBasedDistanceFunction<O,DoubleDistance>, InspectionUtilFrequentlyScanned, Parameterizable

public class SharedNearestNeighborJaccardDistanceFunction<O>
extends AbstractIndexBasedDistanceFunction<O,SharedNearestNeighborIndex<O>,DoubleDistance>

SharedNearestNeighborJaccardDistanceFunction computes the Jaccard coefficient, which is a proper distance metric.


Nested Class Summary
static class SharedNearestNeighborJaccardDistanceFunction.Instance<T>
          Actual instance for a dataset.
static class SharedNearestNeighborJaccardDistanceFunction.Parameterizer<O>
          Parameterization class.
 
Field Summary
 
Fields inherited from class de.lmu.ifi.dbs.elki.distance.distancefunction.AbstractIndexBasedDistanceFunction
indexFactory
 
Fields inherited from interface de.lmu.ifi.dbs.elki.distance.distancefunction.IndexBasedDistanceFunction
INDEX_ID
 
Constructor Summary
SharedNearestNeighborJaccardDistanceFunction(SharedNearestNeighborIndex.Factory<O,SharedNearestNeighborIndex<O>> indexFactory)
          Constructor.
 
Method Summary
 DoubleDistance getDistanceFactory()
          Method to get the distance functions factory.
<T extends O>
SharedNearestNeighborJaccardDistanceFunction.Instance<T>
instantiate(Relation<T> database)
          Instantiate with a database to get the actual distance query.
 
Methods inherited from class de.lmu.ifi.dbs.elki.distance.distancefunction.AbstractIndexBasedDistanceFunction
getInputTypeRestriction, isMetric, isSymmetric
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SharedNearestNeighborJaccardDistanceFunction

public SharedNearestNeighborJaccardDistanceFunction(SharedNearestNeighborIndex.Factory<O,SharedNearestNeighborIndex<O>> indexFactory)
Constructor.

Parameters:
indexFactory - Index factory.
Method Detail

instantiate

public <T extends O> SharedNearestNeighborJaccardDistanceFunction.Instance<T> instantiate(Relation<T> database)
Description copied from interface: DistanceFunction
Instantiate with a database to get the actual distance query.

Parameters:
database - The representation to use
Returns:
Actual distance query.

getDistanceFactory

public DoubleDistance getDistanceFactory()
Description copied from interface: DistanceFunction
Method to get the distance functions factory.

Specified by:
getDistanceFactory in interface DistanceFunction<O,DoubleDistance>
Specified by:
getDistanceFactory in class AbstractDatabaseDistanceFunction<O,DoubleDistance>
Returns:
Factory for distance objects

Release 0.4.0 (2011-09-20_1324)