Package chemaxon.sss.screen
Class Similarity
- java.lang.Object
-
- chemaxon.sss.screen.Similarity
-
@PublicAPI public class Similarity extends Object
Calculates the similarity of two bit strings.
-
-
Constructor Summary
Constructors Constructor Description Similarity(byte[] bitstring1, byte[] bitstring2)
Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static double
getTanimoto(byte[] bitstring1, byte[] bitstring2)
Calculates the Tanimoto coefficient of the two bit strings.static double
getTanimoto(byte[] bitstring1, byte[] bitstring2, int bytesToCompare)
Calculates the Tanimoto coefficient of the two bit strings.static double
getTanimoto(int[] bitstring1, int[] bitstring2, int intsToCompare)
Calculates the Tanimoto coefficient of the two bit strings.double
Tanimoto()
Deprecated.
-
-
-
Constructor Detail
-
Similarity
@Deprecated public Similarity(byte[] bitstring1, byte[] bitstring2)
Deprecated.Initializes the class.- Parameters:
bitstring1
- left operandbitstring2
- right operand
-
-
Method Detail
-
Tanimoto
@Deprecated public double Tanimoto()
Deprecated.Calculates tanimoto.- Returns:
- the tanimoto coefficient
-
getTanimoto
public static double getTanimoto(byte[] bitstring1, byte[] bitstring2)
Calculates the Tanimoto coefficient of the two bit strings. The calculated value is between 0 and 1. The higher the value the more similar are the bit strings. All bits in the byte arrays are used. The length of the byte arrays has to be equal.- Parameters:
bitstring1
- left operandbitstring2
- right operand- Returns:
- the tanimoto coefficient
-
getTanimoto
public static double getTanimoto(byte[] bitstring1, byte[] bitstring2, int bytesToCompare)
Calculates the Tanimoto coefficient of the two bit strings. The calculated value is between 0 and 1. The higher the value the more similar are the bit strings.- Parameters:
bitstring1
- left operandbitstring2
- right operandbytesToCompare
- the number of bytes to use in the calculcation.- Returns:
- the tanimoto coefficient
- Since:
- JChem 3.1
-
getTanimoto
public static double getTanimoto(int[] bitstring1, int[] bitstring2, int intsToCompare)
Calculates the Tanimoto coefficient of the two bit strings. The calculated value is between 0 and 1. The higher the value the more similar are the bit strings.- Parameters:
bitstring1
- left operandbitstring2
- right operandintsToCompare
- the number of bytes to use in the calculcation.- Returns:
- the tanimoto coefficient
- Since:
- JChem 3.1
-
-