public static class ObjectIntMultiVectorJaccard.WeightedJaccardDistanceFunction extends java.lang.Object implements DistanceFunction<ObjectIntMultiVector>, java.io.Serializable
ObjectIntMultiVector
s using a non-metric weighted Jaccard coefficient.Constructor and Description |
---|
ObjectIntMultiVectorJaccard.WeightedJaccardDistanceFunction(ObjectIntMultiVector.WeightProvider weightProviderO1,
ObjectIntMultiVector.WeightProvider weightProviderO2)
Creates a new instance of weighted Jaccard distance function.
|
Modifier and Type | Method and Description |
---|---|
float |
getDistance(ObjectIntMultiVector o1,
ObjectIntMultiVector o2)
Returns the distance between object
o1 and object o2 . |
java.lang.Class<? extends ObjectIntMultiVector> |
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 ObjectIntMultiVectorJaccard.WeightedJaccardDistanceFunction(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(ObjectIntMultiVector o1, ObjectIntMultiVector o2)
DistanceFunction
o1
and object o2
.getDistance
in interface DistanceFunction<ObjectIntMultiVector>
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 ObjectIntMultiVector> getDistanceObjectClass()
DistanceFunction
getDistanceObjectClass
in interface DistanceFunction<ObjectIntMultiVector>