public class BinaryLongManhattan extends Object implements UnguardedDissimilarityCalculator<long[]>, Serializable
long []
.
Use with extreme care! This implementation wont check vector length equality.
Constructor and Description |
---|
BinaryLongManhattan() |
Modifier and Type | Method and Description |
---|---|
double |
denormalize(double dissimilarity)
Calculate raw value for a normalized dissimilarity value.
|
double |
dissimilarity(long[] target,
long[] query)
Compare dissimilarity of two objects.
|
double |
normalize(double rawValue)
Normalize dissimilarity value returned by
UnguardedDissimilarityCalculator.dissimilarity(java.lang.Object, java.lang.Object) . |
String |
toString() |
public double dissimilarity(long[] target, long[] query)
UnguardedDissimilarityCalculator
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
.
dissimilarity
in interface UnguardedDissimilarityCalculator<long[]>
target
- Target to comparequery
- Query to comparepublic double normalize(double rawValue)
UnguardedDissimilarityCalculator
UnguardedDissimilarityCalculator.dissimilarity(java.lang.Object, java.lang.Object)
.normalize
in interface UnguardedDissimilarityCalculator<long[]>
rawValue
- Raw dissimilarity valuepublic double denormalize(double dissimilarity)
UnguardedDissimilarityCalculator
denormalize
in interface UnguardedDissimilarityCalculator<long[]>
dissimilarity
- Normalized dissimilarity value