O
- Object typepublic class InvertedDistanceSimilarityFunction<O> extends AbstractPrimitiveSimilarityFunction<O,DoubleDistance>
Modifier and Type | Field and Description |
---|---|
static OptionID |
DISTANCE_FUNCTION_ID
Parameter to specify the similarity function to derive the distance between
database objects from.
|
protected PrimitiveDistanceFunction<? super O,? extends NumberDistance<?,?>> |
distanceFunction
Holds the similarity function.
|
Constructor and Description |
---|
InvertedDistanceSimilarityFunction() |
Modifier and Type | Method and Description |
---|---|
DoubleDistance |
getDistanceFactory()
Get a distance factory.
|
SimpleTypeInformation<? super O> |
getInputTypeRestriction()
Get the input data type of the function.
|
DoubleDistance |
similarity(O o1,
O o2)
Computes the similarity between two given DatabaseObjects according to this
similarity function.
|
instantiate, isSymmetric
public static final OptionID DISTANCE_FUNCTION_ID
DistanceFunction
.
Key: -adapter.distancefunction
Default value:
EuclideanDistanceFunction
protected PrimitiveDistanceFunction<? super O,? extends NumberDistance<?,?>> distanceFunction
public DoubleDistance getDistanceFactory()
SimilarityFunction
public SimpleTypeInformation<? super O> getInputTypeRestriction()
SimilarityFunction
getInputTypeRestriction
in interface PrimitiveSimilarityFunction<O,DoubleDistance>
getInputTypeRestriction
in interface SimilarityFunction<O,DoubleDistance>
getInputTypeRestriction
in class AbstractPrimitiveSimilarityFunction<O,DoubleDistance>
public DoubleDistance similarity(O o1, O o2)
PrimitiveSimilarityFunction
similarity
in interface PrimitiveSimilarityFunction<O,DoubleDistance>
similarity
in class AbstractPrimitiveSimilarityFunction<O,DoubleDistance>
o1
- first DatabaseObjecto2
- second DatabaseObject