public static class MetaObjectParametricShapeColorAndText.TextDistanceFunction extends java.lang.Object implements DistanceFunction<MetaObjectParametricShapeColorAndText>
MetaObjectParametricShapeColorAndText
that
uses only the distance of the textual descriptor.Constructor and Description |
---|
MetaObjectParametricShapeColorAndText.TextDistanceFunction()
Creates the distance function that calculates distances between the textual descriptors (with no weights).
|
MetaObjectParametricShapeColorAndText.TextDistanceFunction(float[] weights)
Creates the distance function that calculates distances between the textual descriptors using the
provided weights (e.g. for "title", keywords", "searched terms")
|
Modifier and Type | Method and Description |
---|---|
float |
getDistance(MetaObjectParametricShapeColorAndText o1,
MetaObjectParametricShapeColorAndText o2)
Returns the distance between object
o1 and object o2 . |
java.lang.Class<? extends MetaObjectParametricShapeColorAndText> |
getDistanceObjectClass()
Returns the type of objects that this distance function accepts as arguments.
|
public MetaObjectParametricShapeColorAndText.TextDistanceFunction(float[] weights)
weights
- weights to differentiate between importance of individual components of the multi-vectorpublic MetaObjectParametricShapeColorAndText.TextDistanceFunction()
public float getDistance(MetaObjectParametricShapeColorAndText o1, MetaObjectParametricShapeColorAndText o2)
DistanceFunction
o1
and object o2
.getDistance
in interface DistanceFunction<MetaObjectParametricShapeColorAndText>
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 MetaObjectParametricShapeColorAndText> getDistanceObjectClass()
DistanceFunction
getDistanceObjectClass
in interface DistanceFunction<MetaObjectParametricShapeColorAndText>