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 F
indexFactory
Parameter 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 TypeInformation
getInputTypeRestriction()
Get the input data type of the function.boolean
isMetric()
Is this distance function metric (satisfy the triangle inequality)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 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:Distance
Is this distance function metric (satisfy the triangle inequality)
-
isSymmetric
public boolean isSymmetric()
Description copied from interface:Distance
Is this function symmetric?- Specified by:
isSymmetric
in interfaceDistance<O>
- Returns:
true
when symmetric
-
getInputTypeRestriction
public final TypeInformation getInputTypeRestriction()
Description copied from interface:Distance
Get the input data type of the function.- Specified by:
getInputTypeRestriction
in interfaceDistance<O>
- Returns:
- Type restriction
-
-