Package elki.distance.adapter
Class LinearSimilarityAdapter<O>
- java.lang.Object
-
- elki.distance.AbstractDatabaseDistance<O>
-
- elki.distance.adapter.AbstractSimilarityAdapter<O>
-
- elki.distance.adapter.LinearSimilarityAdapter<O>
-
- Type Parameters:
O
- Object class to process.
- All Implemented Interfaces:
Distance<O>
public class LinearSimilarityAdapter<O> extends AbstractSimilarityAdapter<O>
Adapter from a normalized similarity function to a distance function using1 - sim
.- Since:
- 0.2
- Author:
- Erich Schubert
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
LinearSimilarityAdapter.Instance<O>
Distance function instancestatic class
LinearSimilarityAdapter.Par<O>
Parameterization class.
-
Field Summary
-
Fields inherited from class elki.distance.adapter.AbstractSimilarityAdapter
similarityFunction
-
-
Constructor Summary
Constructors Constructor Description LinearSimilarityAdapter(NormalizedSimilarity<? super O> similarityFunction)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T extends O>
DistanceQuery<T>instantiate(Relation<T> database)
Instantiate with a database to get the actual distance query.-
Methods inherited from class elki.distance.adapter.AbstractSimilarityAdapter
equals, getInputTypeRestriction, hashCode, isSymmetric
-
-
-
-
Constructor Detail
-
LinearSimilarityAdapter
public LinearSimilarityAdapter(NormalizedSimilarity<? super O> similarityFunction)
Constructor.- Parameters:
similarityFunction
- Similarity function
-
-
Method Detail
-
instantiate
public <T extends O> DistanceQuery<T> instantiate(Relation<T> database)
Description copied from interface:Distance
Instantiate with a database to get the actual distance query.- Specified by:
instantiate
in interfaceDistance<O>
- Specified by:
instantiate
in classAbstractSimilarityAdapter<O>
- Parameters:
database
- The representation to use- Returns:
- Actual distance query.
-
-