T - Type of compared objects@Beta public interface UnguardedDissimilarityCalculator<T> extends Serializable
Calculated dissimilarity is represented as raw and normalized value. Raw values
Expected contracts for implementations:
SerializableRelaxed API constraints which are expected to be enforced on higher level:
Guarded.getGuardObject()null, lengths, etc)| Modifier and Type | Method and Description |
|---|---|
double |
denormalize(double dissimilarity)
Calculate raw value for a normalized dissimilarity value.
|
double |
dissimilarity(T target,
T query)
Compare dissimilarity of two objects.
|
double |
normalize(double rawValue)
Normalize dissimilarity value returned by
dissimilarity(java.lang.Object, java.lang.Object). |
double dissimilarity(T target, T query)
Note that implementations might not check even basic consistency of compared objects.
Implementations must return valid real numbers which are smaller than Double.MAX_VALUE.
target - Target to comparequery - Query to comparedouble normalize(double rawValue)
dissimilarity(java.lang.Object, java.lang.Object).rawValue - Raw dissimilarity valuedouble denormalize(double dissimilarity)
dissimilarity - Normalized dissimilarity value