Class SimilarityCalculator<T>


  • @PublicAPI
    public abstract class SimilarityCalculator<T>
    extends Object
    Descriptor similarity calculation can be performed using SimilarityCalculator. This class represents a metrics and subclasses must contain all parameters that may required. The SimilarityCalculatorFactory can be used to create an object of this type.
    Since:
    JChem 5.2.2.
    • Constructor Detail

      • SimilarityCalculator

        public SimilarityCalculator()
    • Method Detail

      • setQueryFingerprint

        public void setQueryFingerprint​(T fp)
                                 throws chemaxon.descriptors.SimilarityException
        Sets the query fingerprint
        Parameters:
        fp -
        Throws:
        chemaxon.descriptors.SimilarityException
      • getSimilarity

        public abstract float getSimilarity​(T fp)
                                     throws chemaxon.descriptors.SimilarityException
        Gets the similarity value according to previously defined metric and its parameters. Query fingerprint must be previously setted once using setQueryFingerprint
        Parameters:
        fp - fingerprint type is defined by the subclass using generics.
        Returns:
        similariy score
        Throws:
        chemaxon.screen.SimilarityException - If query has not been setted before or target and query fingerprint has different array length.
        chemaxon.descriptors.SimilarityException
      • getDissimilarity

        public abstract float getDissimilarity​(T fp)
                                        throws chemaxon.descriptors.SimilarityException
        Gets the dissimilarity value according to previously defined metric and its parameters. Query fingerprint must be previously setted once using setQueryFingerprint
        Parameters:
        fp - fingerprint type is defined by the subclass using generics
        Returns:
        similariy score
        Throws:
        chemaxon.screen.SimilarityException - If query has not been setted before or target and query fingerprint has different array length.
        chemaxon.descriptors.SimilarityException