Package elki.similarity
Class AbstractIndexBasedSimilarity<O,F extends IndexFactory<O>>
- java.lang.Object
-
- elki.similarity.AbstractIndexBasedSimilarity<O,F>
-
- Type Parameters:
O
- object typeF
- index type
- All Implemented Interfaces:
IndexBasedSimilarity<O>
,Similarity<O>
- Direct Known Subclasses:
FractionalSharedNearestNeighborSimilarity
,SharedNearestNeighborSimilarity
public abstract class AbstractIndexBasedSimilarity<O,F extends IndexFactory<O>> extends java.lang.Object implements IndexBasedSimilarity<O>
Abstract super class for distance functions needing a preprocessor.- Since:
- 0.1
- Author:
- Elke Achtert
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AbstractIndexBasedSimilarity.Instance<O,I extends Index>
The actual instance bound to a particular database.static class
AbstractIndexBasedSimilarity.Par<F extends IndexFactory<?>>
Parameterization class.
-
Field Summary
Fields Modifier and Type Field Description protected F
indexFactory
Parameter to specify the preprocessor to be used.
-
Constructor Summary
Constructors Constructor Description AbstractIndexBasedSimilarity(F indexFactory)
Constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description TypeInformation
getInputTypeRestriction()
Get the input data type of the function.abstract <T extends O>
AbstractIndexBasedSimilarity.Instance<T,?>instantiate(Relation<T> database)
Preprocess the database to get the actual distance function.boolean
isSymmetric()
Is this function symmetric?
-
-
-
Field Detail
-
indexFactory
protected F extends IndexFactory<O> indexFactory
Parameter to specify the preprocessor to be used.
-
-
Constructor Detail
-
AbstractIndexBasedSimilarity
public AbstractIndexBasedSimilarity(F indexFactory)
Constructor.- Parameters:
indexFactory
-
-
-
Method Detail
-
instantiate
public abstract <T extends O> AbstractIndexBasedSimilarity.Instance<T,?> instantiate(Relation<T> database)
Description copied from interface:IndexBasedSimilarity
Preprocess the database to get the actual distance function.- Specified by:
instantiate
in interfaceIndexBasedSimilarity<O>
- Specified by:
instantiate
in interfaceSimilarity<O>
- Parameters:
database
- Representation to use- Returns:
- Actual distance query.
-
isSymmetric
public boolean isSymmetric()
Description copied from interface:Similarity
Is this function symmetric?- Specified by:
isSymmetric
in interfaceSimilarity<O>
- Returns:
true
when symmetric
-
getInputTypeRestriction
public final TypeInformation getInputTypeRestriction()
Description copied from interface:Similarity
Get the input data type of the function.- Specified by:
getInputTypeRestriction
in interfaceSimilarity<O>
-
-