@Beta @PublicAPI public interface BinaryVectorComparator extends MetricMetadata, Serializable
Please note that this interface is marked with @Beta annotation, so it can be subject of incompatible changes or removal in later releases.
Modifier and Type | Interface and Description |
---|---|
static class |
BinaryVectorComparator.Util
Simple consistency check utility.
|
Modifier and Type | Method and Description |
---|---|
double |
calculateBinaryVectorDissimilarity(int bitCount,
int targetOnly,
int queryOnly,
int common)
Calculate represented dissimilarity score from binary vector parameters.
|
double |
calculateBinaryVectorSimilarity(int bitCount,
int targetOnly,
int queryOnly,
int common)
Calculate represented similarity score from binary vector parameters.
|
double |
getLowerBoundForBinaryVectors(int bitCount)
Possible lowest value of similarity/dissimilarity scores.
|
UnguardedDissimilarityCalculator<long[]> |
getUnguardedDissimilarityCalculator(int bitCount)
Get a suitable dissimilarity calculator for unguarded packed
long[] representations. |
double |
getUpperBoundForBinaryVectors(int bitCount)
Possible highest value of similarity/dissimilarity scores.
|
isDissimilarityZeroIFFEquals, isMetricSpace, isNonNegative, isSymmetric, isTriangeInequalityHolds
double calculateBinaryVectorDissimilarity(int bitCount, int targetOnly, int queryOnly, int common)
bitCount
- Length of binary vectors in bitstargetOnly
- Number of bit positions where only target contains set bitsqueryOnly
- Number of bit positions where only query contains set bitscommon
- Number of bit positions where both query and target contains set bitsdouble calculateBinaryVectorSimilarity(int bitCount, int targetOnly, int queryOnly, int common)
bitCount
- Length of binary vectors in bitstargetOnly
- Number of bit positions where only target contains set bitsqueryOnly
- Number of bit positions where only query contains set bitscommon
- Number of bit positions where both query and target contains set bitsdouble getLowerBoundForBinaryVectors(int bitCount)
bitCount
- Length of binary vectors in bitsdouble getUpperBoundForBinaryVectors(int bitCount)
bitCount
- Length of binary vectors in bitsUnguardedDissimilarityCalculator<long[]> getUnguardedDissimilarityCalculator(int bitCount)
long[]
representations.bitCount
- Bit count of the fingerprints; always is a multiply of 64