public static class MetaObjectCophirKeywords.CophirWeightedCosineDistanceFunction extends java.lang.Object implements DistanceFunction<MetaObjectCophirKeywords>, java.io.Serializable
MetaObjectCophirKeywords
}s using weighted Cosine distance.Constructor and Description |
---|
MetaObjectCophirKeywords.CophirWeightedCosineDistanceFunction(ObjectIntMultiVector.WeightProvider weightProviderO1,
ObjectIntMultiVector.WeightProvider weightProviderO2)
Creates a new instance of weighted Cosine distance function.
|
Modifier and Type | Method and Description |
---|---|
float |
getDistance(MetaObjectCophirKeywords o1,
MetaObjectCophirKeywords o2)
Returns the distance between object
o1 and object o2 . |
java.lang.Class<? extends MetaObjectCophirKeywords> |
getDistanceObjectClass()
Returns the type of objects that this distance function accepts as arguments.
|
ObjectIntMultiVector.WeightProvider |
getWeightProviderO1()
Returns the encapsulated weight provider for the first object.
|
ObjectIntMultiVector.WeightProvider |
getWeightProviderO2()
Returns the encapsulated weight provider for the second object.
|
public MetaObjectCophirKeywords.CophirWeightedCosineDistanceFunction(ObjectIntMultiVector.WeightProvider weightProviderO1, ObjectIntMultiVector.WeightProvider weightProviderO2) throws java.lang.NullPointerException
weightProviderO1
- the weight provider for the first objectweightProviderO2
- the weight provider for the second objectjava.lang.NullPointerException
- if either weightProviderO1
or weightProviderO2
is nullpublic ObjectIntMultiVector.WeightProvider getWeightProviderO1()
public ObjectIntMultiVector.WeightProvider getWeightProviderO2()
public float getDistance(MetaObjectCophirKeywords o1, MetaObjectCophirKeywords o2)
DistanceFunction
o1
and object o2
.getDistance
in interface DistanceFunction<MetaObjectCophirKeywords>
o1
- the object for which to measure the distanceo2
- the object for which to measure the distanceo1
and object o2
public java.lang.Class<? extends MetaObjectCophirKeywords> getDistanceObjectClass()
DistanceFunction
getDistanceObjectClass
in interface DistanceFunction<MetaObjectCophirKeywords>