de.lmu.ifi.dbs.elki.distance.similarityfunction
Class AbstractIndexBasedSimilarityFunction<O,I extends Index,R,D extends Distance<D>>

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.distance.similarityfunction.AbstractIndexBasedSimilarityFunction<O,I,R,D>
Type Parameters:
O - object type
I - index type
D - distance type
All Implemented Interfaces:
IndexBasedSimilarityFunction<O,D>, SimilarityFunction<O,D>, InspectionUtilFrequentlyScanned, Parameterizable
Direct Known Subclasses:
FractionalSharedNearestNeighborSimilarityFunction, SharedNearestNeighborSimilarityFunction

public abstract class AbstractIndexBasedSimilarityFunction<O,I extends Index,R,D extends Distance<D>>
extends Object
implements IndexBasedSimilarityFunction<O,D>

Abstract super class for distance functions needing a preprocessor.


Nested Class Summary
static class AbstractIndexBasedSimilarityFunction.Instance<O,I extends Index,R,D extends Distance<D>>
          The actual instance bound to a particular database.
static class AbstractIndexBasedSimilarityFunction.Parameterizer<F extends IndexFactory<?,?>>
          Parameterization class.
 
Field Summary
static OptionID INDEX_ID
          Parameter to specify the preprocessor to be used.
protected  IndexFactory<O,I> indexFactory
          Parameter to specify the preprocessor to be used.
 
Constructor Summary
AbstractIndexBasedSimilarityFunction(IndexFactory<O,I> indexFactory)
          Constructor.
 
Method Summary
 TypeInformation getInputTypeRestriction()
          Get the input data type of the function.
abstract
<T extends O>
AbstractIndexBasedSimilarityFunction.Instance<T,?,R,D>
instantiate(Relation<T> database)
          Preprocess the database to get the actual distance function.
 boolean isSymmetric()
          Is this function symmetric?
 
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.similarityfunction.SimilarityFunction
getDistanceFactory
 

Field Detail

INDEX_ID

public static final OptionID INDEX_ID
Parameter to specify the preprocessor to be used.

Key: -similarityfunction.preprocessor


indexFactory

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

Key: -similarityfunction.preprocessor

Constructor Detail

AbstractIndexBasedSimilarityFunction

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

Parameters:
indexFactory -
Method Detail

instantiate

public abstract <T extends O> AbstractIndexBasedSimilarityFunction.Instance<T,?,R,D> instantiate(Relation<T> database)
Description copied from interface: IndexBasedSimilarityFunction
Preprocess the database to get the actual distance function.

Specified by:
instantiate in interface IndexBasedSimilarityFunction<O,D extends Distance<D>>
Specified by:
instantiate in interface SimilarityFunction<O,D extends Distance<D>>
Parameters:
database - Representation to use
Returns:
Actual distance query.

isSymmetric

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

Specified by:
isSymmetric in interface SimilarityFunction<O,D extends Distance<D>>
Returns:
true when symmetric

getInputTypeRestriction

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

Specified by:
getInputTypeRestriction in interface SimilarityFunction<O,D extends Distance<D>>

Release 0.4.0 (2011-09-20_1324)