Interface BinaryVectorComparator

All Superinterfaces:
MetricMetadata, Serializable
All Known Implementing Classes:
BinaryMetrics, TverskyParameters

@Beta @PublicApi public interface BinaryVectorComparator extends MetricMetadata, Serializable
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.

  • 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 bits
      targetOnly - Number of bit positions where only target contains set bits
      queryOnly - Number of bit positions where only query contains set bits
      common - 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 bits
      targetOnly - Number of bit positions where only target contains set bits
      queryOnly - Number of bit positions where only query contains set bits
      common - 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 packed long[] representations. For internal use only.
      Parameters:
      bitCount - Bit count of the fingerprints; always is a multiply of 64
      Returns:
      Unguarded calculator