de.lmu.ifi.dbs.elki.distance.distancefunction
Class AbstractIndexBasedDistanceFunction<O,I extends Index,D extends Distance<D>>

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,I,D>
Type Parameters:
O - the type of object to compute the distances in between
I - the type of Index used
D - the type of Distance used
All Implemented Interfaces:
DistanceFunction<O,D>, IndexBasedDistanceFunction<O,D>, InspectionUtilFrequentlyScanned, Parameterizable
Direct Known Subclasses:
AbstractPreferenceVectorBasedCorrelationDistanceFunction, ERiCDistanceFunction, LocallyWeightedDistanceFunction, PCABasedCorrelationDistanceFunction, SharedNearestNeighborJaccardDistanceFunction, SubspaceDistanceFunction

public abstract class AbstractIndexBasedDistanceFunction<O,I extends Index,D extends Distance<D>>
extends AbstractDatabaseDistanceFunction<O,D>
implements IndexBasedDistanceFunction<O,D>

Abstract super class for distance functions needing a database index.


Nested Class Summary
static class AbstractIndexBasedDistanceFunction.Instance<O,I extends Index,D extends Distance<D>,F extends DistanceFunction<? super O,D>>
          The actual instance bound to a particular database.
static class AbstractIndexBasedDistanceFunction.Parameterizer<F extends IndexFactory<?,?>>
          Parameterization class.
 
Field Summary
protected  IndexFactory<O,I> indexFactory
          Parameter to specify the preprocessor to be used.
 
Fields inherited from interface de.lmu.ifi.dbs.elki.distance.distancefunction.IndexBasedDistanceFunction
INDEX_ID
 
Constructor Summary
AbstractIndexBasedDistanceFunction(IndexFactory<O,I> indexFactory)
          Constructor.
 
Method Summary
 TypeInformation getInputTypeRestriction()
          Get the input data type of the function.
 boolean isMetric()
          Is this distance function metric (in particular, does it satisfy the triangle equation?)
 boolean isSymmetric()
          Is this function symmetric?
 
Methods inherited from class de.lmu.ifi.dbs.elki.distance.distancefunction.AbstractDatabaseDistanceFunction
getDistanceFactory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.lmu.ifi.dbs.elki.distance.distancefunction.DistanceFunction
getDistanceFactory, instantiate
 

Field Detail

indexFactory

protected IndexFactory<O,I extends Index> indexFactory
Parameter to specify the preprocessor to be used.

Key: -distancefunction.preprocessor

Constructor Detail

AbstractIndexBasedDistanceFunction

public AbstractIndexBasedDistanceFunction(IndexFactory<O,I> indexFactory)
Constructor.

Parameters:
indexFactory - Index factory
Method Detail

isMetric

public boolean isMetric()
Description copied from interface: DistanceFunction
Is this distance function metric (in particular, does it satisfy the triangle equation?)

Specified by:
isMetric in interface DistanceFunction<O,D extends Distance<D>>
Overrides:
isMetric in class AbstractDatabaseDistanceFunction<O,D extends Distance<D>>
Returns:
true when metric.

isSymmetric

public boolean isSymmetric()
Description copied from interface: DistanceFunction
Is this function symmetric?

Specified by:
isSymmetric in interface DistanceFunction<O,D extends Distance<D>>
Overrides:
isSymmetric in class AbstractDatabaseDistanceFunction<O,D extends Distance<D>>
Returns:
true when symmetric

getInputTypeRestriction

public final TypeInformation getInputTypeRestriction()
Description copied from interface: DistanceFunction
Get the input data type of the function.

Specified by:
getInputTypeRestriction in interface DistanceFunction<O,D extends Distance<D>>
Returns:
Type restriction

Release 0.4.0 (2011-09-20_1324)