Interface DescriptorComparator<D extends Descriptor>

    • Method Detail

      • compare

        ComparisonResult compare​(D target,
                                 D query)
        Compare two descriptors.

        Please note that some implementation might return a result object containing additional data related to the compariosn results.

        Parameters:
        target - Target descriptor
        query - Query descriptor
        Returns:
        Comparison result wrapper
      • calculateSimilarity

        double calculateSimilarity​(byte[] target,
                                   byte[] query)
        Compare two descriptors in serialized form.
        Parameters:
        target - Target descriptor in its serialized form
        query - Query descriptor in its serialized form
        Returns:
        Similarity result
      • calculateDissimilarity

        double calculateDissimilarity​(byte[] target,
                                      byte[] query)
        Compare two descriptors in serialized form.
        Parameters:
        target - Target descriptor in its serialized form
        query - Query descriptor in its serialized form
        Returns:
        Dissimilarity result
      • getLowerBound

        com.google.common.base.Optional<Double> getLowerBound()
        Get lower bound for the similarity/dissimilarity values if such one can be determined.
        Returns:
        Lower bond if exists; otherwise absent
      • getUpperBound

        com.google.common.base.Optional<Double> getUpperBound()
        Get upper bound for the similarity/dissimilarity values if such one can be determined.
        Returns:
        Upper bond if exists; otherwise absent
      • getMetricMetadata

        MetricMetadata getMetricMetadata()
        Metadata about this metric.

        It is guaranteed that the actual instance returned can be used as a parameter of the appropriate comparator getter method of the associated DescriptorGenerator

        Returns:
        Metadata of the comparison
      • unguardedContext

        com.chemaxon.descriptors.common.unguarded.UnguardedContext<D,​?> unguardedContext()
        Associated unguarded context.
        Returns:
        unguarded context