de.lmu.ifi.dbs.elki.distance.distancefunction.adapter
Class SimilarityAdapterLn<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.SimilarityAdapterLn<O>
- Type Parameters:
O
- object class to process.
- All Implemented Interfaces:
- DistanceFunction<O,DoubleDistance>, InspectionUtilFrequentlyScanned, Parameterizable
public class SimilarityAdapterLn<O>
- extends AbstractSimilarityAdapter<O>
Adapter from a normalized similarity function to a distance function using
-log(sim)
.
Method Summary |
|
instantiate(Relation<T> database)
Instantiate with a database to get the actual distance query. |
SimilarityAdapterLn
public SimilarityAdapterLn(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.