Package chemaxon.descriptors
Class SimilarityCalculator<T>
java.lang.Object
chemaxon.descriptors.SimilarityCalculator<T>
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract float
getDissimilarity
(T fp) Gets the dissimilarity value according to previously defined metric and its parameters.abstract float
getSimilarity
(T fp) Gets the similarity value according to previously defined metric and its parameters.void
setQueryFingerprint
(T fp) Sets the query fingerprint
-
Constructor Details
-
SimilarityCalculator
public SimilarityCalculator()
-
-
Method Details
-
setQueryFingerprint
Sets the query fingerprint- Throws:
SimilarityException
-
getSimilarity
Gets the similarity value according to previously defined metric and its parameters. Query fingerprint must be previously setted once usingsetQueryFingerprint
- 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.SimilarityException
-
getDissimilarity
Gets the dissimilarity value according to previously defined metric and its parameters. Query fingerprint must be previously setted once usingsetQueryFingerprint
- 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.SimilarityException
-