Class CrossTableDistanceVisitor
java.lang.Object
com.aquima.interactions.matching.impl.functions.crosstable.CrossTableDistanceVisitor
- All Implemented Interfaces:
ICrosstableDistanceVisitor
This visitor is used during initialization to add the distances to the cross-table definition.
- Since:
- 6.2
- Author:
- O. Kerpershoek, F. van der Meer
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
CrossTableDistanceVisitor
(CrossTableDefinition definition) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addDistance
(IPrimitiveValue fromValue, IPrimitiveValue toValue, int distance) This method can be invoked to define the distance between two domain values.
-
Constructor Details
-
CrossTableDistanceVisitor
-
-
Method Details
-
addDistance
Description copied from interface:ICrosstableDistanceVisitor
This method can be invoked to define the distance between two domain values. The distance between to values is not automatically reversible. If the distance from value A to B is equal to the distance from B to A, the setDistance method should be invoked twice.
Note: The distance is a percentage and should be between 0 and 100. A value of zero means that the offered value is completely different from the requested value. A percentage of 100 means a complete match.- Specified by:
addDistance
in interfaceICrosstableDistanceVisitor
- Parameters:
fromValue
- This is the id of the requested value.toValue
- This is the id of the offered value.distance
- This is the similarity between the requested and the offered value.
-