de.lmu.ifi.dbs.elki.distance.distancefunction.adapter
Class SimilarityAdapterLinear<O>
java.lang.Object
de.lmu.ifi.dbs.elki.distance.distancefunction.AbstractDatabaseDistanceFunction<O,DoubleDistance>
de.lmu.ifi.dbs.elki.distance.distancefunction.adapter.AbstractSimilarityAdapter<O>
de.lmu.ifi.dbs.elki.distance.distancefunction.adapter.SimilarityAdapterLinear<O>
- Type Parameters:
O
- Object class to process.
- All Implemented Interfaces:
- DistanceFunction<O,DoubleDistance>, InspectionUtilFrequentlyScanned, Parameterizable
public class SimilarityAdapterLinear<O>
- extends AbstractSimilarityAdapter<O>
Adapter from a normalized similarity function to a distance function using
1 - sim
.
Method Summary |
|
instantiate(Relation<T> database)
Instantiate with a database to get the actual distance query. |
SimilarityAdapterLinear
public SimilarityAdapterLinear(NormalizedSimilarityFunction<? super O,? extends NumberDistance<?,?>> similarityFunction)
- Constructor.
- Parameters:
similarityFunction
- Similarity function
instantiate
public <T extends O> DistanceQuery<T,DoubleDistance> instantiate(Relation<T> database)
- Description copied from interface:
DistanceFunction
- Instantiate with a database to get the actual distance query.
- Specified by:
instantiate
in interface DistanceFunction<O,DoubleDistance>
- Specified by:
instantiate
in class AbstractSimilarityAdapter<O>
- Parameters:
database
- The representation to use
- Returns:
- Actual distance query.