Package elki.distance
Class AbstractIndexBasedDistance<O,F extends IndexFactory<O>>
- java.lang.Object
-
- elki.distance.AbstractDatabaseDistance<O>
-
- elki.distance.AbstractIndexBasedDistance<O,F>
-
- Type Parameters:
O- the type of object to compute the distances in betweenF- the index factory type
- All Implemented Interfaces:
Distance<O>,IndexBasedDistance<O>
- Direct Known Subclasses:
SharedNearestNeighborJaccardDistance
public abstract class AbstractIndexBasedDistance<O,F extends IndexFactory<O>> extends AbstractDatabaseDistance<O> implements IndexBasedDistance<O>
Abstract super class for distance functions needing a database index.- Since:
- 0.1
- Author:
- Elke Achtert
-
-
Field Summary
Fields Modifier and Type Field Description protected FindexFactoryParameter to specify the preprocessor to be used.-
Fields inherited from interface elki.distance.IndexBasedDistance
INDEX_ID
-
-
Constructor Summary
Constructors Constructor Description AbstractIndexBasedDistance(F indexFactory)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TypeInformationgetInputTypeRestriction()Get the input data type of the function.booleanisMetric()Is this distance function metric (satisfy the triangle inequality)booleanisSymmetric()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 elki.distance.Distance
instantiate, isSquared
-
-
-
-
Field Detail
-
indexFactory
protected F extends IndexFactory<O> indexFactory
Parameter to specify the preprocessor to be used.
-
-
Constructor Detail
-
AbstractIndexBasedDistance
public AbstractIndexBasedDistance(F indexFactory)
Constructor.- Parameters:
indexFactory- Index factory
-
-
Method Detail
-
isMetric
public boolean isMetric()
Description copied from interface:DistanceIs this distance function metric (satisfy the triangle inequality)
-
isSymmetric
public boolean isSymmetric()
Description copied from interface:DistanceIs this function symmetric?- Specified by:
isSymmetricin interfaceDistance<O>- Returns:
truewhen symmetric
-
getInputTypeRestriction
public final TypeInformation getInputTypeRestriction()
Description copied from interface:DistanceGet the input data type of the function.- Specified by:
getInputTypeRestrictionin interfaceDistance<O>- Returns:
- Type restriction
-
-