public class ScaledBytesFvEuclid extends Object implements UnguardedDissimilarityCalculator<Serializable>, Serializable
byte[]
backed float vector descriptors.Constructor and Description |
---|
ScaledBytesFvEuclid(LinearScaler scaler)
Construct.
|
Modifier and Type | Method and Description |
---|---|
double |
denormalize(double dissimilarity)
Calculate raw value for a normalized dissimilarity value.
|
double |
dissimilarity(Serializable target,
Serializable 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 ScaledBytesFvEuclid(LinearScaler scaler)
scaler
- Underlying scalerpublic double dissimilarity(Serializable target, Serializable 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<Serializable>
target
- Target to comparequery
- Query to comparepublic double normalize(double rawValue)
UnguardedDissimilarityCalculator
UnguardedDissimilarityCalculator.dissimilarity(java.lang.Object, java.lang.Object)
.normalize
in interface UnguardedDissimilarityCalculator<Serializable>
rawValue
- Raw dissimilarity valuepublic double denormalize(double dissimilarity)
UnguardedDissimilarityCalculator
denormalize
in interface UnguardedDissimilarityCalculator<Serializable>
dissimilarity
- Normalized dissimilarity value