Package com.chemaxon.descriptors.metrics
Interface BinaryVectorComparator
- All Superinterfaces:
MetricMetadata
,Serializable
- All Known Implementing Classes:
BinaryMetrics
,TverskyParameters
Basic functionality for finite binary vector based calculations.
Please note that this interface is marked with @Beta annotation, so it can be subject of incompatible changes or removal in later releases.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic class
Simple consistency check utility. -
Method Summary
Modifier and TypeMethodDescriptiondouble
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.com.chemaxon.descriptors.common.unguarded.UnguardedDissimilarityCalculator<long[]>
getUnguardedDissimilarityCalculator
(int bitCount) Get a suitable dissimilarity calculator for unguarded packedlong[]
representations.double
getUpperBoundForBinaryVectors
(int bitCount) Possible highest value of similarity/dissimilarity scores.Methods inherited from interface com.chemaxon.descriptors.metrics.MetricMetadata
isDissimilarityZeroIFFEquals, isMetricSpace, isNonNegative, isSymmetric, isTriangeInequalityHolds
-
Method Details
-
calculateBinaryVectorDissimilarity
double calculateBinaryVectorDissimilarity(int bitCount, int targetOnly, int queryOnly, int common) Calculate represented dissimilarity score from binary vector parameters.- Parameters:
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 bits- Returns:
- Dissimilarity score
-
calculateBinaryVectorSimilarity
double calculateBinaryVectorSimilarity(int bitCount, int targetOnly, int queryOnly, int common) Calculate represented similarity score from binary vector parameters.- Parameters:
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 bits- Returns:
- Ssimilarity score
-
getLowerBoundForBinaryVectors
double getLowerBoundForBinaryVectors(int bitCount) Possible lowest value of similarity/dissimilarity scores.- Parameters:
bitCount
- Length of binary vectors in bits- Returns:
- Possible lowest value of similarity/dissimilarity scores
-
getUpperBoundForBinaryVectors
double getUpperBoundForBinaryVectors(int bitCount) Possible highest value of similarity/dissimilarity scores.- Parameters:
bitCount
- Length of binary vectors in bits- Returns:
- Possible highest value of similarity/dissimilarity scores
-
getUnguardedDissimilarityCalculator
com.chemaxon.descriptors.common.unguarded.UnguardedDissimilarityCalculator<long[]> getUnguardedDissimilarityCalculator(int bitCount) Get a suitable dissimilarity calculator for unguarded packedlong[]
representations. For internal use only.- Parameters:
bitCount
- Bit count of the fingerprints; always is a multiply of 64- Returns:
- Unguarded calculator
-